I have a page that is deeply nested. And one that is in the root path. Inside a deeply nested page, I have an anchored tag that should go to another page (which is not in the root, but it's easy to specify the root relative path).
I tried to specify the root path:
<a href="~/home/main.aspx">Home</a>→ This gives me error 404. It cannot resolve the part ~for the root path.
Another option is to move one directory up:
<a href="../../../home/main.aspx">Home</a> → This is a headache.
Then I tried this:
<a href="/home/main.aspx">Home</a>→ This again gave me 404. He simply deleted what appeared after the part localhost:<port_number>/and attached it to /home/main.aspx.
What is the way to indicate the root relative path here?
PS: I assume that the root relative path will be allowed to control the server
source
share