protected void Button1_Click(object sender, EventArgs e) { string username = Session["user"].ToString(); UserRegisterBusiness userReg = new UserRegisterBusiness(); int userId = userReg.GetUserId(username); int typeId = Convert.ToInt32(DropDownList1.SelectedItem.Value); int articleId = Convert.ToInt32(Request.QueryString["id"]); string title = txtTitle.Value; string content = txtContent.Value; int i = userReg.ModifyArticle(title, content, typeId, articleId); if (i != 0) { Response.Redirect("Article.aspx"); } else { Response.Write("Modify Article Failed, Please Try Again"); } }