A
Adam Knight
Hi all,
I have a logout page that contains among other things a header user control.
This control displays the required navigation based upon whether the user is
logged in or not.
What i am trying to do is log a user out and have the navigation dissappear
also.
I have tried issuing the FormsAuthentication.SignOut from
Page_Load,Page_Init() in the hope
the user is logged out before the header control is added in the page. This
obviously isn't the case
as the navigation appears until i refresh the page.
What event or how do i go about logging the user out before the page is
rendered ect..
Current Code:
<%@ Page Language="vb"%>
<%@ Register TagPrefix="?" TagName="footer" Src="../footers/footer.ascx" %>
<%@ Register TagPrefix="?" TagName="header" Src="../headers/header.ascx" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.Security" %>
<script runat="server">
Private Sub Page_Init()
'sign user out of application.
FormsAuthentication.SignOut()
End Sub
</script>
I have a logout page that contains among other things a header user control.
This control displays the required navigation based upon whether the user is
logged in or not.
What i am trying to do is log a user out and have the navigation dissappear
also.
I have tried issuing the FormsAuthentication.SignOut from
Page_Load,Page_Init() in the hope
the user is logged out before the header control is added in the page. This
obviously isn't the case
as the navigation appears until i refresh the page.
What event or how do i go about logging the user out before the page is
rendered ect..
Current Code:
<%@ Page Language="vb"%>
<%@ Register TagPrefix="?" TagName="footer" Src="../footers/footer.ascx" %>
<%@ Register TagPrefix="?" TagName="header" Src="../headers/header.ascx" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.Security" %>
<script runat="server">
Private Sub Page_Init()
'sign user out of application.
FormsAuthentication.SignOut()
End Sub
</script>