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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -