Web.ApplyWebTemplate 方法

Applies the specified site definition or site template to the website that has no template applied to it.

命名空间:  Microsoft.SharePoint.Client
程序集:   Microsoft.SharePoint.Client.Silverlight(位于 Microsoft.SharePoint.Client.Silverlight.dll 中);  Microsoft.SharePoint.Client.Phone(位于 Microsoft.SharePoint.Client.Phone.dll 中)  Microsoft.SharePoint.Client(位于 Microsoft.SharePoint.Client.dll 中)

语法

声明
Public Sub ApplyWebTemplate ( _
    webTemplate As String _
)
用法
Dim instance As Web
Dim webTemplate As String

instance.ApplyWebTemplate(webTemplate)
public void ApplyWebTemplate(
    string webTemplate
)

参数

  • webTemplate
    类型:System.String

    The name of the site definition or the file name of the site template to be applied.

备注

警告

Be careful about calling this method within a website provisioning callback function. If you call this method inside a provisioning callback that is defined within the same site definition configuration that is being applied, you can cause an infinite loop. Instead, create two similar site definition configurations within the site definition, one that is visible and one that is hidden. The visible configuration can then contain a provisioning assembly callback that applies the hidden configuration to websites.

另请参阅

引用

Web 类

Web 成员

Microsoft.SharePoint.Client 命名空间