At Design page in grid view:
<asp:button id="Button1"
runat="server"
CommandArgument='<%#Eval("id")%>'
CommandName="arun"
Text="View Details" />
And Then Code page;
protected void grd_question_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "arun";)
{
Int32 id = Convert.ToInt32(e.CommandArgument);
}
}