A Grid View Command Event Args object is passed to the event-handling method, which enables you to determine the command name and command argument of the button clicked.
In the template field I will Place a label or some controls, So that it’s very easy to access those controls in the code behind by using Find Control method. Item Template is the content to display for the items in the Template Field.
If you do this, your Grid View's source will be refreshed before you're able to grab the new values out of it.
It seems like the Java Script can get mangled otherwise.
Many a times in our applications we use primary keys to get control of the particular record in the gridview.
For this situation, many developers use invisible columns (Hidden columns) in the gridview to identify that row.
Buttons within a Grid View control can also invoke some of the built-in functionality of the control.
To perform one of these operations, set the Command Name property of a button to one of the values in the following table. Sets the Command Argument property of the button to "First", "Last", "Next", "Prev", or a page number to specify the type of paging operation to perform.