How do I convert a string to a textbox object?
Ex.
dim strTest as string
strTest="textbox" & 1
'I want to convert strTest to a textbox object
Thanks,
James
Printable View
How do I convert a string to a textbox object?
Ex.
dim strTest as string
strTest="textbox" & 1
'I want to convert strTest to a textbox object
Thanks,
James
I think what you are looking for is findcontrol
Dim myString as String = "TextBox" & 2
Dim myControl1 As Control = FindControl(myString)
Lord_Rat,
Thanks, your code is what I'm looking for. I've used the FindControl function in the past but since I'm still new to asp.net I forgot about it. Thanks for the reminder.
James