Make a button as template field
<asp:templatefield xmlns:asp="#unknown">
<itemtemplate>
<asp:linkbutton id="lb1" runat="server" causesvalidation="false" onclientclick="return <b>confirm('Are You sure to delete this entry')</b>" text="Delete">CommandArgument='<%#Eval("id")%>' ></asp:linkbutton>
</itemtemplate>
</asp:templatefield>
and on row command event of gridview use as
protected void rowcmd(object sender, GridViewCommandEventArgs e)
{
try
{
Int32 id = Convert.ToInt32(e.CommandArgument);
string comm = "Delete from tblComments where id=@id";
SqlCommand cmd = new SqlCommand(comm, Db.GetConnection());
cmd.Parameters.AddWithValue("id", id);
cmd.ExecuteNonQuery();
GridView1.DataBind();
}
catch (Exception ex)
{
}
}
}