Man*_*Sto 4 asp.net layout controls login
我有一个带有以下标记的登录控件:
<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>
Run Code Online (Sandbox Code Playgroud)
问题是,即使输入错误的用户名或密码,也永远不会显示FailureText.它只是重新加载页面.我需要以某种方式触发这个吗?如果我没有指定LayoutTemplate,它会显示应该的文本(虽然它渲染了大量的表:).
提前致谢!:)