VSWebSite.AddFromTemplate 方法

在此网站项目中创建新的 ProjectItem

命名空间:  VsWebSite
程序集:  VsWebSite.Interop(在 VsWebSite.Interop.dll 中)

语法

声明
Function AddFromTemplate ( _
    bstrRelFolderUrl As String, _
    bstrWizardName As String, _
    bstrLanguage As String, _
    bstrItemName As String, _
    bUseCodeSeparation As Boolean, _
    bstrMasterPage As String, _
    bstrDocType As String _
) As ProjectItem
ProjectItem AddFromTemplate(
    string bstrRelFolderUrl,
    string bstrWizardName,
    string bstrLanguage,
    string bstrItemName,
    bool bUseCodeSeparation,
    string bstrMasterPage,
    string bstrDocType
)
ProjectItem^ AddFromTemplate(
    [InAttribute] String^ bstrRelFolderUrl, 
    [InAttribute] String^ bstrWizardName, 
    [InAttribute] String^ bstrLanguage, 
    [InAttribute] String^ bstrItemName, 
    [InAttribute] bool bUseCodeSeparation, 
    [InAttribute] String^ bstrMasterPage, 
    [InAttribute] String^ bstrDocType
)
abstract AddFromTemplate : 
        bstrRelFolderUrl:string * 
        bstrWizardName:string * 
        bstrLanguage:string * 
        bstrItemName:string * 
        bUseCodeSeparation:bool * 
        bstrMasterPage:string * 
        bstrDocType:string -> ProjectItem 
function AddFromTemplate(
    bstrRelFolderUrl : String, 
    bstrWizardName : String, 
    bstrLanguage : String, 
    bstrItemName : String, 
    bUseCodeSeparation : boolean, 
    bstrMasterPage : String, 
    bstrDocType : String
) : ProjectItem

参数

  • bstrRelFolderUrl
    类型:System.String
    要在其中创建 ProjectItem 对象的文件夹的相对 URL。如果此参数为 nullnull 引用(在 Visual Basic 中为 Nothing) 或空字符串,则将新项添加到此项目的根目录中。
  • bUseCodeSeparation
    类型:System.Boolean
    一个布尔值,用于指示是否使用代码隐藏模型。仅当此项目支持代码隐藏文件时才使用此参数;如果不支持,则忽略此参数。
  • bstrMasterPage
    类型:System.String
    支持母版页和模板(如果适用)的项目的母版页的相对路径和名称;如果不支持,则忽略此参数。

返回值

类型:EnvDTE.ProjectItem
一个 ProjectItem 对象。

.NET Framework 安全性

请参见

参考

VSWebSite 接口

VsWebSite 命名空间

EnvDTE

EnvDTE80

DTE2

其他资源

引用自动化程序集和 DTE2 对象

查找和共享项目模板和项模板