Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refer Controls In ItemTemplate
Message
 
To
24/07/2008 06:38:54
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01333666
Message ID:
01333847
Views:
11
>How can I refer to controls in itemTemplate?
>
>
>
>in CustomValidator1_ServerValidate, I need to refer to TextBox1 to do validation.
>

Try something like:
// Replace grdTemplate with the name of your grid, assuming it's even on a grid.
TextBox text = this.grdTemplate.Rows[this.grdTemplate.EditIndex].Cells[0].FindControl("TextBox1") as TextBox;
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform