Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
SDK Documentation
SPWeb Class
SPWeb Properties
 CustomMasterUrl Property

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
SPWeb.CustomMasterUrl Property (Microsoft.SharePoint)
Gets or sets the URL for a custom master page file to apply to the Web site.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
Public Property CustomMasterUrl As String
Visual Basic (Usage)
Dim instance As SPWeb
Dim value As String

value = instance.CustomMasterUrl

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

Property Value

String that contains the URL of the custom master page.

The MasterUrl and CustomMasterUrl properties are both set to "/_catalogs/masterpage/default.master" by default. If you subsequently need to delete the default.master file, you must set both of those properties to a different value. If you set just one of them to a different value, an error is raised that suggests the default.master file is still being used as the master page for the site.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Meeting Workspaces and Publishing sites have different MasterUrl and CustomMasterUrl properties      Andy Burns   |   Edit   |   Show History

Both meeting workspaces and sites using the publishing feature can have different values for these properties. Indeed the meeting workspaces always have different values.

And setting them to different values didn't cause any kind of error.

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker