Is there a function I can use to bind to a web control on an ASP.NET 2.0 page
if I have a string for the ID of the control? I'd like to be able to throw
an ID string at a function and bind a control object to a textbox control
without having to loop through all the controls on the page.
For example (pseudo code), if I have a textbox with id="txtFirstName"...
Dim ctrlControlPlaceHolder as control
ctrlControlPlaceHolder = FindControlbylID("txtFirstName")
ctrlControlPlaceHolder.text = "Chris"
What I'm looking for is the "FindControlbyID(byVal ID as string)" function.
It's my assumption that there's a native function out there to do it. I
could probably write a function that does the control looping, but I'm going
to have a ton of controls on the page so a native function strikes me as much
more efficient and graceful.
Any help on this is greatly appreciated.
v/r
Chris Frohlich