how to pass textbox value from one form to other form in window application +c#
-
Hi how to pass textbox value from one form to other form in window application +c# .If any one knows this help me with code i'm new to window application Thanks and regards suman
Lots of different ways, but you could expose a property on one of the forms like: public string TheValue { get { return theTextBox.Text; } set { theTextBox.Text = value; } } Your other form can set TheValue using code like chee: form2.TheValue = "stuff"; form2 would be an instance of your "other form" which has already been created, of course.
- S 50 cups of coffee and you know it's on!
-
Hi how to pass textbox value from one form to other form in window application +c# .If any one knows this help me with code i'm new to window application Thanks and regards suman
-
You can also pass it to a session variable and u can retrive the values in the form u needed.
You're very confused. Forms apps do not have session variables.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Hi how to pass textbox value from one form to other form in window application +c# .If any one knows this help me with code i'm new to window application Thanks and regards suman
http://www.codeproject.com/KB/dotnet/passingvaluesbetweenforms.aspx[^] Searching the site is often a good idea.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Hi how to pass textbox value from one form to other form in window application +c# .If any one knows this help me with code i'm new to window application Thanks and regards suman
Hi very very easy there is 2 ways pass the value one form to a nother forms. 1.Properties 2.Constructor params In my point of 2ndis good because of when make cons we , just create overload cons and pass the varible to that. variable is textbox value
Cheers,Earn and Enjoy RRave MCTS,MCPD http://ravesoft.blogspot.com