protected void Page_Load(object sender, EventArgs e) { if (Session != null) { // Store essential session information temporarily string culture = Session["culture"] as string ?? "nl-NL"; Session["culture"] = null; // Restore the essential session information Session["culture"] = culture; } if (Request.Params["id"] == null) { if (HttpContext.Current != null && HttpContext.Current.User != null && HttpContext.Current.User.Identity.IsAuthenticated == true && HttpContext.Current.Session["userid"] == null) { // We got here in a strange way, user is unknown (Session cleared) but // not properly signed out. We try to sign out again and redirect back // here. FormsAuthentication.SignOut(); Response.Redirect("~/Default.aspx", false); } } BasePage obj = new BasePage(); obj.IncludePage(FooterLiteral, Resources.Resource.FooterSection); }
protected void Page_Load(object sender, EventArgs e) { if (Session != null) { // Store essential session information temporarily string culture = Session["culture"] as string ?? "nl-NL"; Session["culture"] = null; // Restore the essential session information Session["culture"] = culture; } if (!Request.IsAuthenticated) { if (Request.Params["pid"] != null || Request.Params["tid"] != null) { Response.Redirect(string.Format("~/Account/Login.aspx?tid={0}&pid={1}", Request.Params["tid"], Request.Params["pid"]), false); } else { Response.Redirect("~/Default.aspx", false); } } Literal name = HeadLoginView.FindControl("HeadLoginName") as Literal; if (name != null) { if (Session["userid"] != null) { long userId = Util.UserId; using (Database db = new MySqlDatabase()) { ClientInfo ci = db.GetClientInfo(userId); name.Text = string.Format(" {0}", ci.FirstName); // ci.GetFullName()); } } } if (!IsPostBack) { BasePage obj = new BasePage(); obj.IncludePage(FooterLiteral, Resources.Resource.FooterSection); } }