質問

システムにログインすると、最初のテンプレートから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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top