Share via


SPWeb.CustomMasterUrl Property

Gets or sets the URL for a custom master page file to apply to 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 CustomMasterUrl As String
    Get
    Set
'Usage
Dim instance As SPWeb
Dim value As String

value = instance.CustomMasterUrl

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

Property Value

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

Remarks

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

See Also

Reference

SPWeb Class

SPWeb Members

Microsoft.SharePoint Namespace