HtmlTextWriter.BeginRender 方法


通知 HtmlTextWriter 对象或派生类的对象,将会呈现某个控件。Notifies an HtmlTextWriter object, or an object of a derived class, that a control is about to be rendered.

 virtual void BeginRender();
public virtual void BeginRender ();
abstract member BeginRender : unit -> unit
override this.BeginRender : unit -> unit
Public Overridable Sub BeginRender ()


BeginRender方法的类实现没有任何功能。 HtmlTextWriterThe HtmlTextWriter class implementation of the BeginRender method has no functionality. 您必须重写BeginRender从派生的HtmlTextWriter类中的方法,以提供您自己的呈现功能。You must override the BeginRender method in a class derived from HtmlTextWriter to provide your own rendering functionality. 例如,在可能需要<p>在控件之前立即呈现元素但在前面确定需要<p>元素的标记语言中,可以使用BeginRender重写。For example, in a markup language that might require <p> elements to be rendered immediately ahead of a control, but where the need for the <p> element is determined earlier, you could use the BeginRender override.