use template field and pass id as CommandArgument
<asp:templatefield xmlns:asp="#unknown">
<itemtemplate>
<asp:linkbutton id="lb1" runat="server" causesvalidation="false" onclientclick="return confirm('Are You sure to delete this entry')" text="Delete" commandargument="<%#Eval("id")%>"></asp:linkbutton>
</itemtemplate>
</asp:templatefield>
and on row command of gridview
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)
{
}
}