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) 或空字符串,则将新项添加到此项目的根目录中。
- bstrWizardName
类型:System.String
创建 ProjectItem 对象时使用的模板的名称。
- bstrLanguage
类型:System.String
ProjectItem 对象的代码语言,例如“C#”或“VB”。
- bstrItemName
类型:System.String
您要为 ProjectItem 对象在项目中指定的名称。
- bUseCodeSeparation
类型:System.Boolean
一个布尔值,用于指示是否使用代码隐藏模型。仅当此项目支持代码隐藏文件时才使用此参数;如果不支持,则忽略此参数。
- bstrMasterPage
类型:System.String
支持母版页和模板(如果适用)的项目的母版页的相对路径和名称;如果不支持,则忽略此参数。
- bstrDocType
类型:System.String
未使用。
返回值
类型:EnvDTE.ProjectItem
一个 ProjectItem 对象。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。