protected void Button1_Click(object sender, EventArgs e) { model.Subject = this.TextBox1.Text; model.Content = this.TextBox2.Text; model.TypeId = Convert.ToInt32(DropDownList1.SelectedValue); model.Author = "个人"; model.Count = 0; model.ID = Convert.ToInt32(Request.QueryString["id"].ToString()); arcbll.Update(model); Response.Write("<script>alert('修改成功!')</script>"); }
public JsonResult UpdateArticle(int id, Article article) { try { BLL_Article.Update(id, article); return(Json(new { success = true, message = "Update Successfully" })); } catch (Exception ex) { return(Json(new { success = false, message = ex.Message })); } }