Edytuj

Udostępnij za pośrednictwem


WebControlAdapter.RenderBeginTag(HtmlTextWriter) Method

Definition

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

protected:
 virtual void RenderBeginTag(System::Web::UI::HtmlTextWriter ^ writer);
protected virtual void RenderBeginTag (System.Web.UI.HtmlTextWriter writer);
abstract member RenderBeginTag : System.Web.UI.HtmlTextWriter -> unit
override this.RenderBeginTag : System.Web.UI.HtmlTextWriter -> unit
Protected Overridable Sub RenderBeginTag (writer As HtmlTextWriter)

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

See also