I have the following string from one of the controls, inside gridview,
inside a control, inside a repeater item.
rptBorrower_ctl00_ctlAuthorizedSigners_gvAuthorizedSigners_ctl04_
The control was a button, but I stripped off the name of that button
and would like to FindControl a textbox that I know is on the same
line of that grid as the button, so it's prefix will be the same.
Do I have to go FindControl the repeater, and then the custom control,
and then the gridview within that control before I can finally
FindControl the textbox? Is there an easier way to do this?
Peter Bucher [MVP] - 16 Jul 2007 16:18 GMT
Hi HockeyFan
> Do I have to go FindControl the repeater, and then the custom control,
> and then the gridview within that control before I can finally
> FindControl the textbox? Is there an easier way to do this?
yes, there is a simplified way to do this.
find the control recursively:
http://www.google.ch/search?hl=de&q=findcontrol+recursive&meta=
but use this method carefull, otherwise it could cost a bit of performance.

Signature
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET