WebControlAdapter.RenderBeginTag(HtmlTextWriter) Method

Definition

Creates the beginning tag for the Web control in the markup that is transmitted to the target browser.

C#
protected virtual void RenderBeginTag(System.Web.UI.HtmlTextWriter writer);

Parameters

writer
HtmlTextWriter

The HtmlTextWriter containing methods to render the target-specific output.

Remarks

Override the RenderBeginTag method to write additional markup tags or add attributes to the beginning tag for the WebControl object. Use RenderBeginTag in conjunction with the RenderEndTag method to assure beginning and ending tag consistency.

Notes to Inheritors

The RenderBeginTag(HtmlTextWriter) base method calls the RenderBeginTag(HtmlTextWriter) method. In turn, the RenderBeginTag(HtmlTextWriter) base method calls the appropriate RenderBeginTag(HtmlTextWriterTag) overload, which is determined by the type of tag with which the WebControl object was created. You can avoid overriding RenderBeginTag(HtmlTextWriter) by deriving from the HtmlTextWriter class and overriding RenderBeginTag(HtmlTextWriterTag), and also possibly RenderEndTag().

Applies to

Prodotto Versioni
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also