Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refer Controls In ItemTemplate
Message
 
À
24/07/2008 06:38:54
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01333666
Message ID:
01333847
Vues:
10
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform