WebControl.Render(HtmlTextWriter) WebControl.Render(HtmlTextWriter) WebControl.Render(HtmlTextWriter) WebControl.Render(HtmlTextWriter) Method


将控件呈现给指定的 HTML 编写器。Renders the control to the specified HTML writer.

protected public:
 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 Friend Overrides Sub Render (writer As HtmlTextWriter)


HtmlTextWriter HtmlTextWriter HtmlTextWriter HtmlTextWriter

接收控件内容的 HtmlTextWriter 对象。The HtmlTextWriter object that receives the control content.


Render方法主要由控件开发人员使用。The Render method is used primarily by control developers.

方法将 Web 控件发送到指定HtmlTextWriter的实例。 RenderThe Render method sends the Web control to the specified HtmlTextWriter instance. 重写此方法以将自定义服务器控件发送到客户端。Override this method to send your custom server control to the client.

方法首先RenderContents调用方法,然后调用方法,最后RenderEndTag调用方法将控件发送到客户端。 RenderBeginTag RenderThe Render method first calls the RenderBeginTag method, then the RenderContents method, and finally the RenderEndTag method to send the control to the client.