From time to time I encounter issues linking to page in Visual Studio when working with ASP.NET application.
I create links to pages but they always redirect to the default one (Default.aspx)
- I trying various thing like deleting and recreate
- Rename the page
- Even If the page does not exist it still redirects to the defaults page.
My Login.aspx
page is the same folder as ForgotPassword.aspx
I create links like this
<asp:HyperLink ID="HyperLink2" runat="server"
NavigateUrl="ForgotPassword.aspx">
Forgot your password ?
</asp:HyperLink>
or
<a href="ForgotPassword.aspx">Forgot your password ?<a>
I am at loss to understand why such basic stuff would fail to work... How can I solve this issue? Could this be a bug?
EDIT: The Url in the browser looks like this:
/Account/Login.aspx?ReturnUrl=%2fAccount%2fForgotPassword.aspx
My webconfig:
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>