protected void editProfileController(object sender, EventArgs e) { registrationErrorHandler editHandler = new registrationErrorHandler(); if (newPhoneNumber.Text == "") { editHandler.emptyPhoneNumber(); } if (!newPhoneNumber.Text.All(char.IsDigit)) { editHandler.invalidPhoneNumber(); } if (newDescription.Text == "") { editHandler.emptyDescription(); } if (editHandler.error == "") { int phone = int.Parse(newPhoneNumber.Text); string description = newDescription.Text; currUser.modifyAccount(phone, description); general_dialog.Visible = false; Session["success"] = "editProfile"; Response.Redirect("main.aspx"); } else { general_dialog.InnerHtml = editHandler.error; general_dialog.Visible = true; } }