protected void btnSave_Click(object sender, EventArgs e) { try { contingency wIns = new contingency(); Int32 IntFlg = wIns.PopulateAmendmentList(Convert.ToInt32(ViewState["EstNum"].ToString()), ddlType.SelectedItem.Value, txtNumber.Text.Trim(),txtfabEndDate.Text.Trim(),chkActive.SelectedItem.Value,txtInotes.Text.Trim()); Response.Write("<script language='javascript'>parent.location.replace('Whitfield_estimation.aspx?EstNum=" + ViewState["EstNum"].ToString() + "');</script>"); } catch (Exception exp) { Response.Write(exp.Message.ToString()); } }