PDA

Click to See Complete Forum and Search --> : Convert string to textbox


jl39775
Jan 14th, 2003, 09:06 AM
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

Lord_Rat
Jan 14th, 2003, 10:45 AM
I think what you are looking for is findcontrol

Dim myString as String = "TextBox" & 2
Dim myControl1 As Control = FindControl(myString)

jl39775
Jan 14th, 2003, 10:51 AM
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