ASP.NET GridView control - Using data in a template column
Posted on 2011-03-25
I've got a GridView control bound to an SqlDataSource control. In the Gridview I've got a TemplateField with a LinkButton control in it. I'm trying to create an OnClientClick event for that LinkButton control that will utilize the ID of the data row bound to the GridView row. I've seen this done before, I just can't seem to find any references on how this is done. I don't care if it gets done in the code behind in the OnRowDataBound event or if it happens in the markup with a server side include statement <% %>. I would be interested in knowing how to do either one effectively though.
Thanks in advance.