protected void btnAdd_Click(Object Sender, EventArgs e) { if (Request.Form[hdnId.UniqueID] == "0") { oVMWare.AddPool(Int32.Parse(ddlParent.SelectedItem.Value), txtName.Text, (chkEnabled.Checked ? 1 : 0)); } else { oVMWare.UpdatePool(Int32.Parse(Request.Form[hdnId.UniqueID]), Int32.Parse(ddlParent.SelectedItem.Value), txtName.Text, (chkEnabled.Checked ? 1 : 0)); } Response.Redirect(Request.Path); }