Sorry if this question is answered somewhere else but I tried searching several pages and was unsuccessful.
So i have an include file (sidebar) which i am using in all pages.
Default.asp
Products.asp
Salary/Survey.asp
inc/sidebar.asp (this is the included file)
now inside sidebar.asp
I have a link for Salary/Survey.asp
from all other pages at root level, i can simply use href='Salary/Survey.asp'
and will work fine. but when I am on page Survey.asp
, writing href='Salary/Survey.asp'
will become actually Salary/Salary/Survey.asp
. I understand it has to be ../Salary/Survey.asp
to be used properly but it will then not work for root level pages.
I can not use root relative
which is /Default.asp
and /Salary/Survey.asp
as I am working for someone else' project and i dont know his directory structure and thus i only have option to document relative
path.
Hope this is clear to understand and someone helps me out.
Thanks!
We solved this problem the following way...
for example:
Then it was a matter of prefacing all the links requiring a relative path with <%=strRelativePath%>