다음을 통해 공유


IVsContainedLanguageHost.InsertControl Method

Sends a request to insert markup.

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

Syntax

‘선언
Function InsertControl ( _
    pwcFullType As String, _
    pwcID As String _
) As Integer
‘사용 방법
Dim instance As IVsContainedLanguageHost
Dim pwcFullType As String
Dim pwcID As String
Dim returnValue As Integer

returnValue = instance.InsertControl(pwcFullType, _
    pwcID)
int InsertControl(
    string pwcFullType,
    string pwcID
)
int InsertControl(
    [InAttribute] String^ pwcFullType, 
    [InAttribute] String^ pwcID
)
abstract InsertControl : 
        pwcFullType:string * 
        pwcID:string -> int 
function InsertControl(
    pwcFullType : String, 
    pwcID : String
) : int

Parameters

  • pwcFullType
    Type: System.String
    [in] The fully qualified type name of the object for which the markup is to be inserted. For example, "System.Web.UI.Page".
  • pwcID
    Type: System.String
    [in] A string containing the ID of the object. See Remarks for an example.

Return Value

Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.

Remarks

COM Signature

From singlefileeditor.idl:

HRESULT InsertControl(
   [in]const WCHAR * pwcFullType,
   [in]const WCHAR * pwcID
);

This method asks the editor to insert a tag into the parent document representing a control with the specified type and ID. For example, if the contained language inserts a control with a type of "System.Web.UI.Button" and an ID of "MyButton" into an ASP.NET page, the markup might look like this:

<asp:Button runat="server" id="MyButton" />

.NET Framework Security

See Also

Reference

IVsContainedLanguageHost Interface

IVsContainedLanguageHost Members

Microsoft.VisualStudio.TextManager.Interop Namespace