ControlDesigner.SetRegionContent(EditableDesignerRegion, String) 方法

定义

指定控件设计时视图中可编辑区域的内容。Specifies the content for an editable region in the design-time view of the control.

protected:
 void SetRegionContent(System::Web::UI::Design::EditableDesignerRegion ^ region, System::String ^ content);
protected void SetRegionContent (System.Web.UI.Design.EditableDesignerRegion region, string content);
member this.SetRegionContent : System.Web.UI.Design.EditableDesignerRegion * string -> unit
Protected Sub SetRegionContent (region As EditableDesignerRegion, content As String)

参数

region
EditableDesignerRegion

控件的设计时视图中包含的可编辑设计区域。An editable design region contained within the design-time view of the control.

content
String

要为可编辑设计区域分配的内容。The content to assign for the editable design region.

注解

通常,在派生的设计器中不会重写 SetRegionContent 方法。Normally, the SetRegionContent method is not overridden in derived designers. 基类会使设计宿主调用区域的 SetEditableDesignerRegionContent 方法。The base class causes the design host to call the SetEditableDesignerRegionContent method for the region. 当控件需要自定义数据时,请重写 SetRegionContent 方法,然后再调用 SetEditableDesignerRegionContent 方法。Override the SetRegionContent method when custom data is required for the control before calling SetEditableDesignerRegionContent method.

使用 SetRegionContent 方法可将 HTML 标记插入控件的某个区域。Use the SetRegionContent method to insert HTML markup into a region of the control.

适用于

另请参阅