I have three separate .aspx pages that handle, logging in, creating a user, and reseting a password. What i want ot do is merged them all into my default.aspx pag and by utilizing panels hide the main content if the user isn't autheticate.
So my Page_Load wil look something similar to this:
Page_Load
{
if (User.IsAutheticated)
{
this.pnlLoggedIn.Visible = true;
}
else
{
this.pnlNotLoggedIn.Visible = true;
}
My WebConfig, currently holds these values to authenticating a users:
<location path="CreateUser.aspx">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
<location path="RetrievePassword.aspx">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
<authentication mode="Forms" >
<forms loginUrl="Login.aspx"
name=".ASPXFORMSAUTH" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
Any ideas on how to role this all up into a single page - Default.aspx?
Sorted this. Changed the Login.aspx to Default.aspx - had some issues with an UpdatePanel, but this was due to the solution drive being changed.