2
Answers

Trouble passing values through classes.

Dealy

Dealy

15y
2.5k
1
Hello,
I have the following problem with passing values through different classes.

In general, MainForm has a textfield called IDNO and i want to load UserControl in MainForm filtered by this IDNO.

  public String return_IDNO()
  {
    return IDNO.Text; //IDNO is a texbox in MainForm()
  }

I call the above in class frmCustomers:UserControl as following:

MainForm cust = new MainForm();
String temp_id=cust.return_IDNO();

I called the above code when loading the UserControl.

Any suggestions?

Thank you in advance.
Answers (2)