c# - A link will work from root but from a sub folder won't -
c# - A link will work from root but from a sub folder won't -
i writing web application , have stumbled upon unusual issue (most missing trivial). issue: suppose have menu 2 buttons(links) users, companies
the home.aspx @ root level. here directory structure.
home.aspx /users/userdetail.aspx /company/companyedit.aspx
when user @ home.aspx , clicks on menu item users, routed users/userdetail.aspx correctly. 1 time user on userdetail.aspx , bring mouse on companies button(link) on menu , @ task bar of browser , unusual url shows this
/users/company/companyedit.aspx
which means when click, page never found beingness looked @ in wrong folder.. above problem happens when link in next format
users/company/companyedit.aspx
but if utilize
/users/company/companyedit.aspx
then users session key changed , destroys existing session.
can 1 elaborate overlooking (i pretty doing majorly dumb can not set finger on it)....why looses application context. edit: sorry messy comment below, here sample of code using create menu items
<li style="background-image:url('bg.png');background-repeat:no-repeat;background-position:3px;"> <a href="~/users/userdetails.aspx" class="arrow">users detail</a></li> </li> <li style="background-image:url('bg.png');background-repeat:no-repeat; background-position:3px;"> <a href='~/company/companyedit.aspx' class="arrow">compnay profile</a> </li>
while trying things come across
<%=response.applyapppathmodifier('/folder/myurl.aspx') %>
this seems have worked , have solved issues. took time particularly donnelle..thanks
c# asp.net iis-7
Comments
Post a Comment