protected void Button2_Click(object sender, EventArgs e) { MemberBL memBL = new MemberBL(); try { if (memBL.mem_update(Session["mID"].ToString(), name.Text, sex.SelectedValue, phone.Text, cellphone.Text, address.Text, email.Text) > 0) { Session["name"] = AntiXss.HtmlEncode(name.Text); Session["Sex"] = AntiXss.HtmlEncode(sex.SelectedValue); Session["phone"] = AntiXss.HtmlEncode(phone.Text); Session["cellphone"] = AntiXss.HtmlEncode(cellphone.Text); Session["address"] = AntiXss.HtmlEncode(address.Text); Session["email"] = AntiXss.HtmlEncode(email.Text); Response.Redirect("~/member/mem_updateOK.aspx"); } else { Response.Write("<script>alert('會員資料修改失敗!');</script>"); } } catch (Exception ex) { ex.ToString(); } }