passing textbox value one form to another form..
-
-
Hi I am creating a windows application, it has two Forms one is Login Form which has two textBox Control for user name and password..... i want to display his username in the Second Form label Control..... Please give Some idea Thanks in advance
hoh sorry.. i am working in WPF .net 3.5. i was replied in that mood. it will work there.. extremly sorry mads115.. here better u may can use that in constructors, or by giving in the properties or in the public string and all
modified on Monday, June 1, 2009 7:04 AM
-
Hi I am creating a windows application, it has two Forms one is Login Form which has two textBox Control for user name and password..... i want to display his username in the Second Form label Control..... Please give Some idea Thanks in advance
-
hoh sorry.. i am working in WPF .net 3.5. i was replied in that mood. it will work there.. extremly sorry mads115.. here better u may can use that in constructors, or by giving in the properties or in the public string and all
modified on Monday, June 1, 2009 7:04 AM
-
hoh sorry.. i am working in WPF .net 3.5. i was replied in that mood. it will work there.. extremly sorry mads115.. here better u may can use that in constructors, or by giving in the properties or in the public string and all
modified on Monday, June 1, 2009 7:04 AM
Hema Bairavan wrote:
form2 newform = new form2(); newform.label1.text = this.textbox1; newform.label2.text = this.textbox2;
WOW! That's really bad.
Navaneeth How to use google | Ask smart questions
-
Hi iam getting this error near label1 'WindowsApplication1.Form2.label1' is inaccessible due to its protection level' Form2 newform = new Form2(); newform.label1.Text = this.textBox1.Text;
Colin has an article on the subject - Passing Values between Forms in .NET 1.x with C# and VB.NET examples[^] :)
Navaneeth How to use google | Ask smart questions
-
Hi iam getting this error near label1 'WindowsApplication1.Form2.label1' is inaccessible due to its protection level' Form2 newform = new Form2(); newform.label1.Text = this.textBox1.Text;
You will as the controls are private - which is as they should be. Better to create your own public properties and in the setters, validate the value if neeeded and uptdate the controls from there.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus)