次の方法で共有


SPWeb.CustomMasterUrl Property

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)

Syntax

Public Property CustomMasterUrl As String
    Get
    Set

Dim instance As SPWeb
Dim value As String

value = instance.CustomMasterUrl

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

Property Value

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

Remarks

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.

See Also

Reference

SPWeb Class

SPWeb Members

Microsoft.SharePoint Namespace