I have a template field in my gridview which holds a button for each row, however when I test it to see if it's working it doesn't do anything, the page just reloads but nothing has happened. What I want the button to do in the end is to unlock a user. At the minute I'm testing it by having a panel appear if the button is clicked.

                    <asp:Button ID="btnUnlock" runat="server" CommandArgument='<%# Eval("UserId") %>'
                        CommandName="Select" Text="Unlock" OnCommand="btnUnlock_Command"/>

This is the part of the gridview for the button, not sure for the code behind should I use the button onCommand method or gridview rowCommand method?

3 Years
Discussion Span
Last Post by coder91

Yes but this was a different problem I was having with the page. Was able to sort it, just needed a clean refresh of the page.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.