First of all, remove following lines from your code
e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this.grdAppuser, "Select$" + e.Row.RowIndex);
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
Then Add following events to your gridView aspx
<asp:gridview id="grdAppuser" runat="server" autogeneratecolumns="false" xmlns:asp="#unknown">
OnRowCommand="grdAppuser_RowCommand" OnRowDataBound="grdAppuser_RowDataBound" Width="90%">
<asp:imagebutton id="imgbtnDelete" commandname="Delete1" commandargument="<%#Eval("VisID")%>" runat="server" imageurl="images/button_delete.png" />
</asp:gridview>
Then add this in your
Row Command
event, you will surely get
e.CommandArgument
value
protected void grdAppuser_RowCommand(object sender, GridViewCommandEventArgs e)
{
switch (e.CommandName)
{
case ("Delete1"):
string id = Convert.ToString(e.CommandArgument);
}
}
Hope this will work for you.