In form 1 you create an instance of form 3 , then from form 1 you can call all public objects from form 3 . Follow this code : Form1 : private Form3 _frm1_frm3=null; public Form3 frm1_frm3 { get {return _frm1_frm3;} set {_frm1_frm3=value;} } In form 1 with textbox1 you call a public textbox from form 3 named : textbox3 : if(frm1_frm3!=null && frm1_frm3.isdispose==false) { this.textbox1.text = frm1_frm3.textbox3.text; } Hope this helps you .
Ok, as far as I know, you can't put more then one form with runat = server on the page.
The question is why do you need more then one form?
You can create one form which will be defined on the whole page and put the textboxes in it, and then it is easy
text1.text = text2.text and that's all
LiyaPosted Jun 1, 2010, 4:40 AM
MinhPosted Jun 6, 2010, 10:51 AM
Follow this code :
Form1 :
private Form3 _frm1_frm3=null;
public Form3 frm1_frm3
{
get {return _frm1_frm3;}
set {_frm1_frm3=value;}
}
In form 1 with textbox1 you call a public textbox from form 3 named : textbox3 :
if(frm1_frm3!=null && frm1_frm3.isdispose==false)
{
this.textbox1.text = frm1_frm3.textbox3.text;
}
Hope this helps you .
LiyaPosted Jun 1, 2010, 5:46 AM
The question is why do you need more then one form?
You can create one form which will be defined on the whole page and put the textboxes in it, and then it is easy
text1.text = text2.text and that's all
Gowthamaprabhu SPosted Jun 1, 2010, 4:52 AM