I have a user login page which uses an ASP.Net Login control. I have set the PasswordRecoveryText and the PasswordRecoveryUrl. If I leave it at that, nothing is displayed for password recovery:
<asp:LoginID="LoginUser"runat="server"EnableViewState="false"RenderOuterTable="false"CreateUserText="Create a new user..."CreateUserUrl="~/Account/Register.aspx"PasswordRecoveryText="Forgot password?"PasswordRecoveryUrl="~/Account/RecoverPassword.aspx">
If I add a Hyperlink like so and click the hyperlink, I am returned to the same page I was on, the Login page. Any hints would be appreciated. The full code for the Login control is at the bottom.
<asp:HyperLinkID="RecoverPasswordLink"runat="server"NavigateUrl="~/Account/RecoverPassword.aspx">Forgot password?</asp:HyperLink>
CODE:
<asp:Login ID="LoginUser" runat="server" EnableViewState="false" RenderOuterTable="false"
CreateUserText="Create a new user..." CreateUserUrl="~/Account/Register.aspx"
PasswordRecoveryText="Forgot password?" PasswordRecoveryUrl="~/Account/RecoverPassword.aspx">
<LayoutTemplate>
<span class="failureNotification">
<asp:Literal ID="FailureText" runat="server"></asp:Literal>
</span>
<asp:ValidationSummary ID="LoginUserValidationSummary" runat="server" CssClass="failureNotification"
ValidationGroup="LoginUserValidationGroup" />
<div class="accountInfo">
<fieldset class="login">
<legend>Account Information</legend>
<p>
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Username:</asp:Label>
<asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required."
ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
</p>
<p>
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
<asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required."
ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
</p>
<p>
<asp:CheckBox ID="RememberMe" runat="server" />
<asp:Label ID="RememberMeLabel" runat="server" AssociatedControlID="RememberMe" CssClass="inline">Keep me logged in</asp:Label>
</p>
</fieldset>
<p>
<asp:HyperLink ID="RecoverPasswordLink" runat="server" NavigateUrl="~/Account/RecoverPassword.aspx">Forgot password?</asp:HyperLink>
</p>
<p class="submitButton">
<asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="LoginUserValidationGroup"
OnClick="LoginButton_Click" />
</p>
</div>
</LayoutTemplate>
</asp:Login>