if clicked one of column in gridvew datakeyname not change automatically like this, value hiddenfield1 no sometimes change true, sometimes change false not consisten do you have idea
Dim rowindex As Integer, row As GridViewRow
If e.CommandName = "view" Then
rowindex = Convert.ToInt32(e.CommandArgument)
row = GridView1.Rows(rowindex)
HiddenField1.Value = Convert.ToInt32(GridView1.DataKeys(rowindex).Values(0))
MsgBox(HiddenField1.Value)