protected void Page_Load(object sender, EventArgs e) { try { if (Session["UserName"] == null) { Response.Redirect("FrmLogin.aspx"); } if (!IsPostBack) { ddlbind.BindAccType(ddlAccType); ddlbind.BindAccType(ddlAccType1); ddlbind.BindAccStatus11(ddlOpType); ddlbind.BindAccStatus11(ddlOpType1); autoglname.ContextKey = Session["BRCD"].ToString(); //Only admin will have the access to view the form if ((Session["BRCD"].ToString() != "1") && (CMN.GetParameter("1", "CBSP", "1003").ToString() == "N")) { HttpContext.Current.Response.Redirect("FrmBlank.aspx", false); } else { TxtBrcd.Text = Session["BRCD"].ToString(); Txtprodcode.Focus(); } } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }