FindControl

I know using FindControl in ASP.NET is not always as easy as it would seem on the surface. Particularly when you start looking for controls inside of a DataGrid or a Repeater. This article should help out.
posted on Saturday, April 24, 2004 8:36 PM by scott

Comments

Thursday, March 17, 2005 2:14 AM by Sathya

# re: FindControl

ads
Monday, May 09, 2005 1:18 PM by T

# re: FindControl

ttt
Monday, August 22, 2005 7:35 PM by MouseSkip

# re: FindControl

good article
Thursday, January 19, 2006 4:34 AM by daryl

# re: FindControl

I looked at this code and the comments.
I have an issue where I am using template columns and when a link button is clicked I run some code:
Dim txtIPTC As TextBox = CType(DataGrid1.Items(DataGrid1.SelectedIndex).FindControl("txtIPTC"), TextBox)

Problem is that datagrid1.selectedindex, always returns -1

anyway around this?