System.Web.UI.HtmlControls.HtmlSelect.ClearSelection Method

Clears the list selection of the System.Web.UI.HtmlControls.HtmlSelect control and sets the System.Web.UI.WebControls.ListItem.Selected property of all items to false.

Syntax

protected virtual void ClearSelection ()

Remarks

The HtmlSelect.ClearSelection method iterates through the System.Web.UI.WebControls.ListItemCollection collection represented by the System.Web.UI.HtmlControls.HtmlSelect control's HtmlSelect.Items property and sets the System.Web.UI.WebControls.ListItem.Selected property of each System.Web.UI.WebControls.ListItem object to false.

Requirements

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