SPWeb.ApplyWebTemplate 方法

Applies the specified site definition object or site template object to the SharePoint Foundation website.

重载 列表

  名称 说明
公共方法 ApplyWebTemplate(String) Applies the specified site definition or site template to the website that has no template applied to it.
公共方法 ApplyWebTemplate(SPWebTemplate) Applies the specified site definition object or site template object to the website that has no template applied to it.

页首

备注

警告

Be careful about calling this method within a website provisioning callback function. If you call this method inside of a provisioning callback function 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 configuration can then contain a provisioning assembly callback function that applies the hidden configuration to websites.

另请参阅

引用

SPWeb 类

SPWeb 成员

Microsoft.SharePoint 命名空间