a question about relative paths

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
 
H

harborsparrow

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.
 
A

Abubakar

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top