protected void Page_Init(object sender, EventArgs e) { StringBuilder sb = new StringBuilder(); if (Session["username"] == null) { sb.Append("<a href='/index.aspx'>Log In</a>"); } else { MembershipUser user = Membership.GetUser(Session["username"].ToString()); sb.AppendFormat(wFunctions.BuildSignedInInfo()); } lblSignIn.Text = sb.ToString(); }
protected void Page_Init(object sender, EventArgs e) { wFunctions.LogInUserFromCookie(); if (Session["username"] == null) { Response.Redirect("/pages_static/logout"); } else { lblSignIn.Text = wFunctions.BuildSignedInInfo(); } if (!IsPostBack) { wFunctions.BuildMenu(ltlMenu); ltlMobileMenu.Text = ltlMenu.Text; } }