System.Web.UI.WebControls.Label.AddAttributesToRender Method

Adds the HTML attributes and styles of a System.Web.UI.WebControls.Label control to render to the specified output stream.

Syntax

protected override void AddAttributesToRender (System.Web.UI.HtmlTextWriter writer)

Parameters

writer
An System.Web.UI.HtmlTextWriter that represents the output stream to render HTML content on the client.

Remarks

The Label.AddAttributesToRender(System.Web.UI.HtmlTextWriter) method is used primarily by control developers to insert the additional attributes and styles to the System.Web.UI.HtmlTextWriter output stream for a System.Web.UI.WebControls.Label control.

The Label.AddAttributesToRender(System.Web.UI.HtmlTextWriter) method for a System.Web.UI.WebControls.Label control determines whether the for attribute should be added with the Label.AssociatedControlID value, and if the inline-block style should be applied to display the border style and width.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0