Dealy

Dealy

  • NA
  • 213
  • 0

Trouble passing values through classes.

Sep 25 2009 7:29 AM
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)