LoginView Controlでログイン状況を変更する方法
-
15-11-2019 - |
質問
システムにログインすると、最初のテンプレートから2番目のテンプレートへのステータスを変更する方法は?
<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ <a href="~/Login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome!
[ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="/Logout.aspx"/> ]
</LoggedInTemplate>
</asp:LoginView>
.
ログインステータスを検出する方法?
他のヒント
The LoginView Control handles this for you. It is done using the ASP.NET Forms authentication and the "IsAuthenticated" property that is managed by ASP.NET.
所属していません StackOverflow