IVsContainedLanguageHost::InsertControl Method (String^, String^)

 

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)

int InsertControl(
	String^ pwcFullType,
	String^ pwcID
)

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.

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" />
Return to top
Show: