protected void Page_Load(object sender, EventArgs e) { if (Session["DealerCode"] != null) { lblDealerName.Text = Session["DealerDesc"].ToString(); lblUserName.Text = "Wellcome - " + Session["UserName"].ToString(); lblUser.Text = Session["UserName"].ToString(); lblUser2.Text = Session["UserName"].ToString(); if (!(Session["Image"] == null)) { ImgProfile.ImageUrl = "~\\" + Session["Image"].ToString(); ImgProfile2.ImageUrl = "~\\" + Session["ProfileImg"].ToString(); } Imagelogo.ImageUrl = "~\\" + Session["Image"].ToString().Trim(); lblCoDesc.Text = Session["DealerDesc"].ToString(); } else { Response.Redirect("~/login.aspx"); } if (sec.FormsVerification(Session["UserName"].ToString(), Session["DealerCode"].ToString(), Session["ApplicationCode"].ToString().Trim(), ref dt)) { if (dt != null) { Session["FormVerification"] = dt; LinkButton[] txts = { lnkJobMaster, lnkCustInvoice }; DataRow[] drr = dt.Select(); for (int i = 0; i < drr.Length; i++) { sysfun.checkForms(Page, dt.Rows[i]["FormName"].ToString()); } } } }