SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a html custom master page with html links. I am currently using static url's to link to pages and wondered if there is a way I can use a dynamic path in asp or sharepoint language so that when I export to a production environment, I won't need to change the links manually.

I am looking for something like this, if it's possible:

http://<site url here>/Pages/Newpage.aspx

share|improve this question
up vote 3 down vote accepted

You could use relative paths, like in most web development, like


Or use SPUrl tokens inline in the src or href attribute. See more here:

This link is 2007, but most tokens should still be valid!

share|improve this answer
thanks that helped a lot. – binga30 May 2 '13 at 6:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.