i am developing windows application in C#.
my requirement is in First form i have multiple textbox like name,id,patient etc.. if i search by id, name and patient information will show in form1, or if i search by name, id and patient information will show. it is working in my first form.. now i have second form where there is only one textbox, which should suppose to show the value i entered to search in first form. (i.e suppose i search information using id. then id should show in second form textbox. or if i search information using name. then name should show in second form textbox.)
Please Help! i am searching it for past 3 days but not getting how to do.
Thank You.
VulpesPosted Apr 21, 2014, 6:25 AM
If the second form (Form2 say) is open already, you can then do:
Form2 f2 = Application.OpenForms["Form2"] as Form2;
if (f2 != null)
{
f2.textBox1 = id; // or name or patient
}
JyothiPosted Apr 21, 2014, 5:14 AM
session variables
Session["somevalue"] = 100
You can assigh this session variable in another form