Sep 23, 2011

Tip: Easy Way to Make Relative Links in Masterpage

Ever been frustrated because of how difficult if not impossible it is to fix in masterpages relative links within a Site Collection that actually work throughout the Site Collection? The solution is really quite simple (though not real pretty inside the html): use asp:Literal for href value.

For example:

Or use the SharePoint Link Button, which is a bit prettier, eg.

No comments: