Hi, can you please try this?
<asp:LinkButton ID="LinkButton1" runat="server" onClick='OnDeleteComment(Int.Parse(Eval("ID").ToString() ) )' >Delete</asp:LinkButton>
if this does not work try changing your function to this
public static void OnDeleteComment(int commentid)
{
...
}