html - ReturnURL messed up when a page links to itself -
i have home.aspx
, about.aspx
in root directory, account folder included login.aspx
, register.aspx
, manage.aspx
.
i have navbar includes links relevant pages depending on whether user logged in or not. suppose if @ login.aspx
page , clicks again on link /login.aspx
, return url becomes returnurl="localhost:xxxx/account/account/login.aspx"
if click on register.aspx
now, becomes account/account/account/register.aspx
what called , how rectify it? think need make virtual root directory relative addresses resolved.
hrefs this,
<li id="registerlink" runat="server"><a href="account/register.aspx"><span class="glyphicon glyphicon-user"></span> register</a></li> <li id="loginlink" runat="server"><a href="account/login.aspx"><span class="glyphicon glyphicon-log-in"></span> login</a></li>
you use relative anchor instead of absolute one. try change :
<a href="account/register.aspx">
to :
<a href="/account/register.aspx">
you can try 1 :
<a href="../config2.aspx">
maybe if remove account fix :
<a href="register.aspx">
or try :
<a href="~/account/register.aspx">
or organize folders in other way.
Comments
Post a Comment