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

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -