Exemple #1
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            Button bt  = (Button)sender;
            int    nid = Convert.ToInt32(((HiddenField)(bt.Parent.FindControl("HiddenField1"))).Value);

            if (CommentsService.DeleteComments(nid) > 0)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "message", "<script language='javascript' >alert('删除成功!');</script>");
                BindMessage();
            }
        }