html - relative URI in sidebar with subfolders -


i have designed website subfolders , sidebar navigation menu, when enter page in subfolder, links refers current folder instead of root, using tilde doesnt resolve issue, if example type this:

<a href="~/editor.aspx"> 

it not lookup tilde ad root folder in path , fail, if im in subfolder "articles" , on page "resume.aspx" try lookup for:

http://www.website.../articles/~/editor.aspx 

how can correctly use root reference in <a> tag without using server.mappath on sidebar (masterpage) links?

edit: happens when current folder set "articles" , click on "/register.aspx"? wont page under "articles" folder?

a root-relative url starts / character.so, <a href="/editor.aspx"> fine.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -