protected void rpReplys_ItemCommand(object source, RepeaterCommandEventArgs e) { ReplyBll abll = new ReplyBll(); int replyId = Convert.ToInt32(e.CommandArgument); if (e.CommandName == "del") { abll.Delete(replyId); BindAnswers(); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string id = context.Request["id"]; int showId = int.Parse(id); if (replyBll.Delete(showId)) { context.Response.Redirect("LookReply.aspx"); } else { context.Response.Write("删除失败"); context.Response.Write(id); } }