protected void btnBlacklistPolicy_Click(object sender, EventArgs e) { if (txtVehicleNo.Text.Trim() == "" && txtPolicyNo.Text.Trim() == "") { lblMsg.Text = "Please enter Vehicle No or Policy No."; Timer1.Enabled = true; return; } if (txtRemarks.Text.Trim() == "") { lblMsg.Text = "Please enter remark for Blacklisting"; Timer1.Enabled = true; return; } try { string UserCode = ""; string UserBranch = ""; HttpCookie reqCookies = Request.Cookies["userInfo"]; if (reqCookies != null) { UserCode = reqCookies["UserCode"].ToString(); UserBranch = reqCookies["UserBranch"].ToString(); } ProposalUploadController proposalUploadController = new ProposalUploadController(); proposalUploadController.BlacklistPolicy(txtVehicleNo.Text, txtPolicyNo.Text, txtRemarks.Text, UserCode); ClearComponents(); // SearchData(); lblMsg.Text = "Successfully Blacklisted"; Timer1.Enabled = true; ManageFormComponents("INITIAL"); //Response.Redirect("UserRegistration.aspx"); } catch (Exception ex) { lblMsg.Text = "Error While Saving"; Timer1.Enabled = true; } }