๐Ÿ”’ 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).webp
Screenshot (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
  • 404
    Views
  • 2
    Participants
Last reply from:
aa1012

Online now

Members online
1,045
Guests online
697
Total visitors
1,742

Forum statistics

Threads
2,276,966
Posts
28,973,387
Members
1,229,669
Latest member
zeeeee345
Back
Top