Activate Sharepoint Matser Page Programatically

http://msdn.microsoft.com/en-us/library/ms476046(office.12).aspx

Sharepoint provide several tokens:

(1) Two dynamic tokens — ~masterurl/default.master, ~masterurl/cutom.master, Master à Dynamic

Example — <%@ Page MasterPageFile=”~masterurl\default.master”%>, the token “~masterurl/default.master”
is replaced at run time by the value in the MasterUrl property.
The token
“~masterurl/custom.master”
is replaced at run time by the value in the CustomMasterUrl
property

(2)
Two

static tokens — ~ site/default.master, ~sitecollection/default.master, Site à Static

You can use these tokens to link to a site-relative or site collection-relative master page.

For example, if your content page is located at http://siteColl/subsite1/subsite2/default.aspx and you use the token “~sitecollection/mypage.master”, your content page would use the master page at http://siteColl/mypage.master. If you use the token “~site/mypage.master”,
the content page would use the master page located at http://siteColl/subsite1/subsite2/mypage.master.

You can add static Web Parts (not in a zone). Nothing else.

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: