Share via


SPWeb.MasterUrl Property

Gets or sets the URL of the master page that is used for the website.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Property MasterUrl As String
    Get
    Set
'Usage
Dim instance As SPWeb
Dim value As String

value = instance.MasterUrl

instance.MasterUrl = value
public string MasterUrl { get; set; }

Property Value

Type: System.String
A string that contains the URL of the master page.

Remarks

At runtime, the value in this property replaces the ~masterurl/default.master token in content pages.

See Also

Reference

SPWeb Class

SPWeb Members

Microsoft.SharePoint Namespace