Login to ASP.NET Access Control System

I have an input control with the following markup:

<asp:Login ID="ScrapLogin" runat="server" FailureText="Brugeren findes ikke eller adgangskoden er forkert!" RenderOuterTable="false">
<LayoutTemplate>
    <ul class="form">
        <li>
            <asp:Label AssociatedControlID="UserName" runat="server" Text="Brugernavn:" />
            <asp:TextBox ID="UserName" runat="server" />
        </li>
        <li>
            <asp:Label AssociatedControlID="Password" runat="server" Text="Password:" />
            <asp:TextBox ID="Password" runat="server" TextMode="Password" />
        </li>
    </ul>
    <asp:Button ID="Login" runat="server" Text="Log ind!" />
    *<asp:Literal ID="FailureText" runat="server" EnableViewState="false" />*
</LayoutTemplate>

The problem is that FailureText is never displayed, even when I enter the wrong username or password. It just reloads the page. Do I need to call this somehow? If I do not specify a LayoutTemplate, it will display the text as it should (although it displays with the number of tables :).

Thanks in advance!:)

+5
source share
1 answer

-, , "". CommandName "Login". , - .

+10

All Articles