a question about relative paths

  • Thread starter Thread starter Abubakar
  • Start date Start date
A

Abubakar

Hi all,
I am working on a asp.net website (using vs2k5). I have made a header.html
which I include in all the pages. The header.html contains the code to draw
menus. The menu code has urls for each item in the menus, like lets say
"reports/page1.aspx". My problem is that the valid menus links from one
location do not remain valid for another location. Lets say the page1.aspx
was clicked, now the user is inside the "localhost/reports", and the menu
header may contain something like "page2.aspx" which is not in the "reports"
folder (hence invalid link if the user is inside /reports), so the
page2.aspx link now should be "../page2.aspx". How do I fix this?

Thanks,
ab
 
Rather than including the menu in a header file, try putting the menu
in a master page, with the other pages being content pages that use
this master page.
 
But right now everything is already coded. I was trying to add a new folder
and put a page there and things were not working as I expected, hence this
question.
Cant I just write the urls in the header.html in a way that all becomes
relavent to the website's root path? Everything will work than.

ab.
 
Back
Top