protected void issuBmit_Click(object sender, ImageClickEventArgs e) { IDAL.IUsers iu = BllFactory.BllAccess.CreateIUsersBLL(); string context = fckPL.Value; int userid = 100; string picString = ""; if (HttpContext.Current.Session["pic"] != null) { picString = HttpContext.Current.Session["pic"].ToString(); } if (HttpContext.Current.User.Identity.Name != "") { userid = Convert.ToInt32(HttpContext.Current.User.Identity.Name); } if (picString != txValid.Text) { ClientScript.RegisterClientScriptBlock(this.GetType(), "s", "<script type='text/javascript'>alert('验证码错误,评论失败!');</script>"); return; } else { iu.addReplayBook(userid, booId, context); Response.Redirect("BookCover.aspx?bookId=" + booId); } }