protected void btnAdd_Click(Object Sender, EventArgs e) { if (Request.Form[hdnId.UniqueID] == "0") { oForecast.AddForecastResposeCategory(txtName.Text.Trim(), (chkEnabled.Checked ? 1 : 0), intProfile); } else { oForecast.UpdateForecastResposeCategory(Int32.Parse(Request.Form[hdnId.UniqueID]), txtName.Text, (chkEnabled.Checked ? 1 : 0), intProfile); } Response.Redirect(Request.Path); }