connecting windows forms

  • Thread starter Thread starter usha
  • Start date Start date
U

usha

Hi All

Can you help in working with windows forms since i have knowledge of
webforms

i do not know how to go from one win from to another with the data in
previous forms.
pls help and claryfying my doubt.
thanks
usha s
 
* "usha said:
Can you help in working with windows forms since i have knowledge of
webforms

i do not know how to go from one win from to another with the data in
previous forms.

Add properties to your forms and set the properties before showing the
forms.
 
One thing I do is modify the constructor (or add a new one) for the
form class such as:

private int id = 0;
private string message = "";

public frmWinForm(int id, string message)
{
\\Constructor code
this.id = id;
this.message = message;
}

Then when creating the form, just use the new constructor to send your
values:

frmWinForm myForm = new frmWinForm(12, "Test");
myForm.Show();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top