GridView BoundField Control Names

  • Thread starter Thread starter GridView Newbie
  • Start date Start date
G

GridView Newbie

Is there a way to explicitly name BoundFields in a GridView? The controls
are getting names like "ctl10". There is one control that I would like to
name "LocationType" so I can pass that string into FindControl() instead of
the meaningless "ctl10".

Thanks for the help.
 
For FindControl you are using control ids, not client ids. But anyway you
can't use FindControl to locate a BoundField. FindControl is good for
templates. You can data from Cells collection of the row or you may use
DataItem to get the column values as they come from the database.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
 
Back
Top