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
'Declaration
Function InsertControl ( _
pwcFullType As String, _
pwcID As String _
) As Integer
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.