Compartir a través de


VSWebSite.AddFromTemplate Method

Creates a new ProjectItem in the Web site project.

Namespace:  VsWebSite
Assembly:  VsWebSite.Interop (in VsWebSite.Interop.dll)

Syntax

'Declaration
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

Parameters

  • bstrRelFolderUrl
    Type: System.String

    A relative URL for the folder in which to create the ProjectItem object. If this parameter is nulla null reference (Nothing in Visual Basic) or an empty string, the item is added to the root of the project.

  • bUseCodeSeparation
    Type: System.Boolean

    A Boolean value indicating whether to use the code-behind model. This parameter is used only when the project supports code-behind files; otherwise it is ignored.

  • bstrMasterPage
    Type: System.String

    The relative path and name of the master page for projects that support master pages, and if applicable, the template; otherwise this parameter is ignored.

Return Value

Type: EnvDTE.ProjectItem
A ProjectItem object.

.NET Framework Security

See Also

Reference

VSWebSite Interface

VsWebSite Namespace

EnvDTE

EnvDTE80

DTE2

Other Resources

Referencing Automation Assemblies and the DTE2 Object

Finding and Sharing Project and Item Templates