protected void EGV_RowCommand(object sender, GridViewCommandEventArgs e) { switch (e.CommandName.ToLower()) { case "del2": int id = Convert.ToInt32(e.CommandArgument); groupBll.Del(id); MyBind(); break; } }
protected void Page_Load(object sender, EventArgs e) { if (function.isAjax()) { string action = Request["action"]; int id = DataConverter.CLng(Request["id"]); switch (action) { case "del": gpBll.Del(id); break; } Response.Write(""); Response.Flush(); Response.End(); } if (!IsPostBack) { MyBind(); } }