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.

适用于

另请参阅