//fills the customer information when form loading protected void Page_Load(object sender, EventArgs e) { if (Session["CustomerId"] == null) { Server.Transfer("SignUp.aspx", true); } if (!IsPostBack) { try { cust = CustomerDB.GetCustomerByCustomerId((int)Session["CustomerId"]); fillCustomer(cust); } catch (Exception ex) { lblUpdateError.Text = ex.Message; } } }
//cancel the update protected void btnCancel_Click(object sender, EventArgs e) { cust = CustomerDB.GetCustomerByCustomerId((int)Session["CustomerId"]); fillCustomer(cust); lblUpdateError.Text = ""; }