次の方法で共有


IVsContainedLanguageHost.InsertControl(String, String) Method

Definition

Sends a request to insert markup.

public:
 int InsertControl(System::String ^ pwcFullType, System::String ^ pwcID);
public:
 int InsertControl(Platform::String ^ pwcFullType, Platform::String ^ pwcID);
int InsertControl(std::wstring const & pwcFullType, std::wstring const & pwcID);
public int InsertControl (string pwcFullType, string pwcID);
abstract member InsertControl : string * string -> int
Public Function InsertControl (pwcFullType As String, pwcID As String) As Integer

Parameters

pwcFullType
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
String

[in] A string containing the ID of the object. See Remarks for an example.

Returns

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" />  

Applies to