System.Web.UI.HtmlControls.HtmlSelect.RenderChildren Method

Renders the System.Web.UI.HtmlControls.HtmlSelect control's child controls to the specified System.Web.UI.HtmlTextWriter object.

Syntax

protected override void RenderChildren (System.Web.UI.HtmlTextWriter w)

Parameters

w
a System.Web.UI.HtmlTextWriter

Remarks

The HtmlSelect.RenderChildren(System.Web.UI.HtmlTextWriter) method overrides the base class's System.Web.UI.Control.RenderChildren(System.Web.UI.HtmlTextWriter) method without calling the base method. Each of the <option> elements between the opening and closing <select> tags is rendered with a value attribute, a selected attribute if the item is selected, and its associated text.

If multiple items were selected but the HtmlSelect.Multiple property is set to false, then an System.Web.HttpException exception is thrown.

Requirements

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