Hidable select button

How do I create a button which has the visable attribute which, when pressed, the code behind can reference values in the row it was on?

cheers

monkey

Sorry, but this is all a bit new to me - how do i detect the parent row? I presume from this i will be able to something like:

((Label)parentrow.Row.FindControl("lblUserName")).Text

(my grid view uses template fields with labels to allow me to do this)?

you have to tie the row id to the value property of the button, then you can query with that id

Cheers - any chance of a simple eg?

thanks again

He meant something like this I guess
<input id=“ID” runat=“server” visible=“false” type=“button” value=“id” />

You can also use a label with text value as id and visible false.
when a click is made on a row, you need to detect the parent row of the sender. then for that row find label/button control and retrieve the value.