//Button click edits details of exising size protected void UpdateSize_Click(object sender, EventArgs e) { //Get the size id int Size_ID = Convert.ToInt32(SizeID.Value); string edit = SR.Editsize(Name.Value, Dimension.Value, Size_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 = "Size edit changes not saved. "; error.Visible = true; } //if size doesn't exist. else if (edit.Equals("size does not exist")) { error.Text = "Size doesn't exist."; error.Visible = true; } }