protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (SecurityContext.Current.IsAuthenticated)
         {
             bool logout;
             bool.TryParse(Request["Logout"], out logout);
             if (logout)
             {
                 LogoutLinkButton_Click(null, null);
             }
         }
     }
     if (Request["ShowCreate"] == "0")
     {
         CreateUser1.Visible = false;
     }
     if (Request["ShowReset"] == "0")
     {
         ResetPassword1.Visible = false;
     }
     if (Request["ShowLogIn"] == "0")
     {
         LoginUser1.Visible = false;
     }
     LoginBanner.DataBind();
     AnonymousPlaceHolder.DataBind();
     LoggedInPlaceHolder.DataBind();
     RegisterPanel.DataBind();
     AnonymousPlaceHolder.Visible = !SecurityContext.Current.IsAuthenticated;
     LoggedInPlaceHolder.Visible  = SecurityContext.Current.IsAuthenticated;
 }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (SecurityContext.Current.IsAuthenticated && Request["Logout"] == "True")
         {
             LogoutLinkButton_Click(null, null);
         }
     }
     LoginBanner.DataBind();
     AnonymousPlaceHolder.DataBind();
     LoggedInPlaceHolder.DataBind();
     RegisterPanel.DataBind();
     AnonymousPlaceHolder.Visible = !SecurityContext.Current.IsAuthenticated;
     LoggedInPlaceHolder.Visible  = SecurityContext.Current.IsAuthenticated;
 }