🔒 Closed C# usercontrol and form problem

Status
Not open for further replies.

FourBytes

Established
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
  • 411
    Views
  • 2
    Participants
Last reply from:
aa1012

Trending Topics

Online now

Members online
1,304
Guests online
1,942
Total visitors
3,246

Forum statistics

Threads
2,292,188
Posts
29,075,040
Members
1,210,195
Latest member
ank12
Back
Top