C# 单页登录
我有三个单独的.aspx页面,分别处理登录、创建用户和重置密码。我要做的是将它们全部合并到我的default.aspx pag中,如果用户未授权,则通过使用面板隐藏主要内容 因此,我的页面加载将类似于以下内容:C# 单页登录,c#,login,ssp,C#,Login,Ssp,我有三个单独的.aspx页面,分别处理登录、创建用户和重置密码。我要做的是将它们全部合并到我的default.aspx pag中,如果用户未授权,则通过使用面板隐藏主要内容 因此,我的页面加载将类似于以下内容: Page_Load { if (User.IsAutheticated) { this.pnlLoggedIn.Visible = true; } else { this.pnlNotLoggedIn.Visible = true; } M
Page_Load
{
if (User.IsAutheticated)
{
this.pnlLoggedIn.Visible = true;
}
else
{
this.pnlNotLoggedIn.Visible = true;
}
My WebConfig当前保存以下值以验证用户:
<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>
有没有关于如何将这些内容整合到一个页面的想法-Default.aspx?对其进行了排序。将Login.aspx更改为Default.aspx-UpdatePanel存在一些问题,但这是由于解决方案驱动器被更改