//Button click edits details of exising Mask protected void UpdateMaskType_Click(object sender, EventArgs e) { //Get the Mask id int Mask_ID = Convert.ToInt32(MaskID.Value); //Conversion from String to Integer int admin = Convert.ToInt32(MaskAdmin.Value); string edit = SR.Edittype(MaskName.Value, MaskDescription.Value, admin, Mask_ID); //if edit is successful if (edit.Equals("updated")) { Response.Redirect("Home.aspx"); } //if edit is unsuccessful else if (edit.Equals("unsuccessful update")) { error.Text = "Mask edit changes not saved. "; error.Visible = true; } //if product doesn't exist. else if (edit.Equals("Mask does not exist")) { error.Text = "Mask doesn't exist."; error.Visible = true; } }