accessing data from one form in another form [modified]
-
Hi, I have two windows application forms(form1 & form2).. In the form1 i hv a textbox asking for phonenumber. When ever user enters the phone no. in the text box, I want to display that data(ph. no) in Form2.. IS this possible by any way? if so, how can I achieve it? Could any one please shed some light on it..... Thanks in Advance. :) -- modified at 6:20 Thursday 28th June, 2007
-
Hi, I have two windows application forms(form1 & form2).. In the form1 i hv a textbox asking for phonenumber. When ever user enters the phone no. in the text box, I want to display that data(ph. no) in Form2.. IS this possible by any way? if so, how can I achieve it? Could any one please shed some light on it..... Thanks in Advance. :) -- modified at 6:20 Thursday 28th June, 2007
These are web forms ? You can store data in the session, put it on the URL, or do a cross page postback.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
These are web forms ? You can store data in the session, put it on the URL, or do a cross page postback.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
sorry, i mean to say windows application forms... like form1.cs & form2.cs sorry again...:-O
Create a property/variable in Form2. Assign phone number to it.
-
Hi, I have two windows application forms(form1 & form2).. In the form1 i hv a textbox asking for phonenumber. When ever user enters the phone no. in the text box, I want to display that data(ph. no) in Form2.. IS this possible by any way? if so, how can I achieve it? Could any one please shed some light on it..... Thanks in Advance. :) -- modified at 6:20 Thursday 28th June, 2007
Code snippets: Form1: string ph_no="121212"; Form2 frm2=new Form2(); frm2.ph_no=this.ph_no; frm2.Show(); Form2: public string ph_no; form_load() { Messagebox(ph_no); } :rose:
Regards Chintan www.visharadsoft.com (Nothing is so purify as KNOWLEDGE)
-
Code snippets: Form1: string ph_no="121212"; Form2 frm2=new Form2(); frm2.ph_no=this.ph_no; frm2.Show(); Form2: public string ph_no; form_load() { Messagebox(ph_no); } :rose:
Regards Chintan www.visharadsoft.com (Nothing is so purify as KNOWLEDGE)
-
Hi, Thanks for your reply... but its giving me this error:: "An unhandled exception of type 'System.StackOverflowException' occurred" Thanks..
Most likely cause is: the set part of your property is assigning a new value to the property itself, rathet than to some local variable (upper/lower case!). :)
Luc Pattyn [My Articles] [Forum Guidelines]