I have a login 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, the FailureText is never shown, even when I enter a wrong username or password. It just reloads the page. Do I need to trigger this myself somehow? If I don't specify the LayoutTemplate, it shows the text as it should (although it renders with tons of tables :).
Thanks in advance! :)
Hehe, I just found out that it isn't enough to just give the button an Id of "Login". The CommandName has to be set to "Login". I'm just leaving the solution here if anyone else should stumple upon this problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With