How can I set the Text property of a child textbox control in a panel control on an asp.net web form?
I have panel1 and it has textBox5 in it. I want to set the text in textbox5 to "Hello". How do you do this?
I know how you can't do it and this is what I have been trying:
Dim ctl As System.Web.UI.WebControl
Dim child As TextBox
ctl = FindControl("panel1")
child = CType(ctl.Controls(1), TextBox)
child.Text = "Hey"
This always gives an inavlid cast for child. I tried webControl.TextBox with the same results.
Any suggestions?
I have panel1 and it has textBox5 in it. I want to set the text in textbox5 to "Hello". How do you do this?
I know how you can't do it and this is what I have been trying:
Dim ctl As System.Web.UI.WebControl
Dim child As TextBox
ctl = FindControl("panel1")
child = CType(ctl.Controls(1), TextBox)
child.Text = "Hey"
This always gives an inavlid cast for child. I tried webControl.TextBox with the same results.
Any suggestions?