WebControl.Render(HtmlTextWriter) 方法

定義

將控制項呈現在指定的 HTML 寫入器中。Renders the control to the specified HTML writer.

protected:
 override void Render(System::Web::UI::HtmlTextWriter ^ writer);
protected public:
 override void Render(System::Web::UI::HtmlTextWriter ^ writer);
protected override void Render (System.Web.UI.HtmlTextWriter writer);
protected internal override void Render (System.Web.UI.HtmlTextWriter writer);
override this.Render : System.Web.UI.HtmlTextWriter -> unit
Protected Overrides Sub Render (writer As HtmlTextWriter)
Protected Friend Overrides Sub Render (writer As HtmlTextWriter)

參數

writer
HtmlTextWriter

接收控制項內容的 HtmlTextWriter 物件。The HtmlTextWriter object that receives the control content.

備註

Render方法主要是由控制項開發人員使用。The Render method is used primarily by control developers.

Render方法會將 Web 控制項傳送至指定的 HtmlTextWriter 實例。The Render method sends the Web control to the specified HtmlTextWriter instance. 覆寫這個方法,以將自訂伺服器控制項傳送給用戶端。Override this method to send your custom server control to the client.

Render方法會先呼叫 RenderBeginTag 方法,然後呼叫方法 RenderContents ,最後再呼叫方法,以將 RenderEndTag 控制項傳送至用戶端。The Render method first calls the RenderBeginTag method, then the RenderContents method, and finally the RenderEndTag method to send the control to the client.

適用於