protected void updateBtn_Click(object sender, EventArgs e) { int id = Convert.ToInt32(Request.QueryString["Id"]); string name = nameBox.Text; if (!UpdatePaymentTypeController.isBoxFilled(name)) { nameValidate.Text = "Name must be filled!"; } if (!UpdatePaymentTypeController.checkLenght(name)) { warningLbl.Text = "Name must be 3 chars or more"; } else if (UpdatePaymentTypeController.checkDuplicateName(name)) { warningLbl.Text = "Name already exist!"; } else { UpdatePaymentTypeController.requestUpdatePayment(id, name); Response.Redirect("./ViewPaymentType.aspx"); } }