Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

What exactly does the MasterPageFile=“~masterurl/default.master” in the page mean?

$
0
0

Hi Everyone,

I want to create a site definition that use my own master page in the homepage (VS2012 + SP2010). When the site definition is created, there are already codes in the default.aspx page that simply display a string in the body. And the page refers to a master page at ~masterurl/default.master.

My question is, where exactly does ~masterurl point to? I want to use my own master page to replace it, but when I change it to any other location rather than~masterurl/default.master, it gives me an error saying file not found.

So could anyone tell me how can I use my own master page in the default.aspx page? I tryied to place my master page file in the LAYOUTS folder and refer to it usingMasterPageFile="_layouts/site.master" but it does not work, either.

Thanks in advance.


Cavendish Feng


Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>