🔒 Closed C# usercontrol and form problem

Status
Not open for further replies.

FourBytes

Honorary Poster
Dear phc,
I have a problem with linking these two.
I created a usercontrol and a form. Inside the form code i declare a -public string itemID- the value of that variable will change when i click a certain button in the usercontrol. Here is the code and this code is inside the usercontrol code:
Screenshot (22).webp

And this one is inside the form Screenshot (23).webpScreenshot (24).webp

The problem is that the value showing is still null and does not change at all. Will you help me with this one? Thanks in advance.
 
You have instantiated your form_specs_burger twice in your filet_click event, hence the initialization of your variable resets to null.
 
Status
Not open for further replies.

About this Thread

  • 3
    Replies
  • 415
    Views
  • 2
    Participants
Last reply from:
aa1012

Trending Topics

Online now

Members online
416
Guests online
3,459
Total visitors
3,875

Forum statistics

Threads
2,306,480
Posts
29,172,035
Members
1,194,860
Latest member
oc-gg
Back
Top