georgepatotk
Contributor
Code:
Sub ShowMyTextBox()
Dim MyTextBox As New TextBox
MyTextBox.ID = "MyTextBox"
MyTextBox.Text = "MyTextBox"
Me.Panel1.Controls.Add(MyTextBox)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ShowMyTextBox()
End Sub
As pasted above, I have two button in a web form.
Button1 is to create a textbox.
I have the other button named Button2.
When I press Button2, the created text box is disappear.
Can you tell me why the created textbox is disappear when I press button2??