protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { if (Session["UserName"] == null) { Response.Redirect("FrmLogin.aspx"); } txtdate.Text = Session["EntryDate"].ToString(); txtdate.Enabled = false; txtprdcode.Focus(); autoglname.ContextKey = Session["BRCD"].ToString(); BD.BindAssestLocation(ddlAstLoc); BD.BindAssestLocation(ddlbranchname); ViewState["UN_FL"] = Request.QueryString["FLAG"].ToString(); Flag = "1"; ViewState["Flag"] = "AD"; BtnSubmit.Text = "Submit"; TblDiv_MainWindow.Visible = false; Div_grid.Visible = true; BindGrid("ED"); BD.BindStatus(DDLstatusname); BD.BindDItem(DDlitemno); BD.BindASL(DDlASL); BD.BindDep(DDlDep); BD.BindSanction(DDlSanction); BD.BindTypeofitm(DDltypeofitm); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }