I've a page that is deeply nested. And one that is in the root path. Inside of the deeply nested page I have an anchor tag which is supposed to navigate to another page (which is not in the root, but it is easy to specify a root relative path).
I've done the following trying to specify a root relative path:
<a href="~/home/main.aspx">Home</a>
-> This one gives me a 404 error. It is not able to resolve ~
part to the root path.
The other option is to travel one directory up:
<a href="../../../home/main.aspx">Home</a>
-> This is headache.
Then I tried this:
<a href="/home/main.aspx">Home</a>
-> This gave me a 404 again. It simply removed what came after the localhost:<port_number>/
part and affixed it with /home/main.aspx
.
What is the way to specify a root relative path here?
PS: I assume the root relative path will resolve for server controls