0

When using a like so:

<a href="../One/Two/Three/Four.aspx">Search</a>

Does the .. go back one directory from where it is clicked, or does it go to the root of the project structure?

edit: A better way to ask: I am referencing a .js file from my Master page, how do I keep the reference relative if I don't know the depth of child pages that will use the Master page?

3 Answers 3

1

The .. folder means one level down from the current folder.

The browser can't go from the project root folder, because it doesn't know where that root folder is, or what the project is for that matter. You can use / at the beginning of an URL to go to the site root, but that may be different from the project root.

Sign up to request clarification or add additional context in comments.

Comments

1

It goes back one directory.

/one/two/three/etc Assumes that /one is in the root directory. Hope it helps

Comments

1

../One/Two/Three/Four.aspx goes back one directory

/One/Two/Three/Four.aspx starts from the root

Read this article which explains everything including the use of tilde (~)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.