using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class settings : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { string new_name = TextBox1.Text; string new_pwd = TextBox2.Text; string new_mail = TextBox3.Text; int id = int.Parse(Session["managerid"].ToString()); logic log = new logic(); if (new_name != "") { if (log.edit_manager_name(new_name, id) == true) { Response.Redirect("~/home.aspx", true); } else Label1.Text = "not updated"; } if (new_pwd != "") { if (log.edit_password(new_pwd, id) == true) { Response.Redirect("~/home.aspx", true); } else Label1.Text = "not updated"; } if (new_mail != "") { if (log.edit_mail(new_mail, id) == true) { Response.Redirect("~/home.aspx", true); } else Label1.Text = "not updated"; } } }