Compartir a través de


IVsWebProject.AddNewWebItem Method

Adds a new Web item to the project.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

Syntax

'Declaration
Function AddNewWebItem ( _
    itemidLoc As UInteger, _
    dwAddItemOperation As VSADDITEMOPERATION, _
    pszItemName As String, _
    pszFileTemplate As String, _
    options As UInteger, _
    pszSelectedLanguage As String, _
    hwndDlgOwner As IntPtr, _
    <OutAttribute> pResult As VSADDRESULT() _
) As Integer
int AddNewWebItem(
    uint itemidLoc,
    VSADDITEMOPERATION dwAddItemOperation,
    string pszItemName,
    string pszFileTemplate,
    uint options,
    string pszSelectedLanguage,
    IntPtr hwndDlgOwner,
    VSADDRESULT[] pResult
)
int AddNewWebItem(
    [InAttribute] unsigned int itemidLoc, 
    [InAttribute] VSADDITEMOPERATION dwAddItemOperation, 
    [InAttribute] String^ pszItemName, 
    [InAttribute] String^ pszFileTemplate, 
    [InAttribute] unsigned int options, 
    [InAttribute] String^ pszSelectedLanguage, 
    [InAttribute] IntPtr hwndDlgOwner, 
    [OutAttribute] array<VSADDRESULT>^ pResult
)
abstract AddNewWebItem : 
        itemidLoc:uint32 * 
        dwAddItemOperation:VSADDITEMOPERATION * 
        pszItemName:string * 
        pszFileTemplate:string * 
        options:uint32 * 
        pszSelectedLanguage:string * 
        hwndDlgOwner:IntPtr * 
        pResult:VSADDRESULT[] byref -> int
function AddNewWebItem(
    itemidLoc : uint, 
    dwAddItemOperation : VSADDITEMOPERATION, 
    pszItemName : String, 
    pszFileTemplate : String, 
    options : uint, 
    pszSelectedLanguage : String, 
    hwndDlgOwner : IntPtr, 
    pResult : VSADDRESULT[]
) : int

Parameters

  • itemidLoc
    Type: UInt32

    [in] Folder to which the item is to be added.

  • pszItemName
    Type: String

    [in] Name of the item.

  • pszFileTemplate
    Type: String

    [in] Path to the template the user selected.

  • options
    Type: UInt32

    [in] The options checked on the dialog for the item.

  • pszSelectedLanguage
    Type: String

    [in] String selected from the languages dropdown (can be null).

  • hwndDlgOwner
    Type: IntPtr

    [in] Handle to the Add New Web Item dialog.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell80.idl:

HRESULT IVsWebProject::AddNewWebItem(
   [in] VSITEMID itemidLoc, 
   [in] VSADDITEMOPERATION dwAddItemOperation, 
   [in] LPCOLESTR pszItemName, 
   [in] LPCOLESTR pszFileTemplate, 
   [in] VSADDNEWWEBITEMOPTIONS options, 
   [in] LPCOLESTR pszSelectedLanguage, 
   [in] HWND hwndDlgOwner, 
   [out, retval] VSADDRESULT * pResult
);

.NET Framework Security

See Also

Reference

IVsWebProject Interface

Microsoft.VisualStudio.Shell.Interop Namespace