how to get value of one textbox from one form to another in VB.NET?
-
can anybody tell me how to get value of a textbox of form1.vb into textbox of form2.vb in Vb.net. ex : I have two forms form1.vb and form2.vb both are having one textbox each then i put some value into textbox of form1.vb and then I load form2.vb and into that loading event I added Form2_load() form2.textbox1.text = form1.textbox1.text end sub plz tell me how to do that. --waiting for a quick reply Aakash
-
can anybody tell me how to get value of a textbox of form1.vb into textbox of form2.vb in Vb.net. ex : I have two forms form1.vb and form2.vb both are having one textbox each then i put some value into textbox of form1.vb and then I load form2.vb and into that loading event I added Form2_load() form2.textbox1.text = form1.textbox1.text end sub plz tell me how to do that. --waiting for a quick reply Aakash
drmzunlimited, Keep in mind there are many ways to do this. When I did this I created two forms, a textbox on each and a button on form1 to invoke this action, the click event of the button looks like this:
Private Sub Button1\_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a As String Dim b As Form2 b = New Form2() a = Me.TextBox1.Text.ToString b.TextBox1.Text = a.ToString b.Show() End Sub
:) Nick Parker
The greatest lesson in life is to know that even fools are right sometimes. - Winston Churchill