SelectListItem Class

Represents an item in an HTML select list.

Inheritance Hierarchy


Namespace:  System.Web.WebPages.Html
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)


Public Class SelectListItem
Dim instance As SelectListItem
public class SelectListItem
public ref class SelectListItem
type SelectListItem =  class end
public class SelectListItem

The SelectListItem type exposes the following members.


  Name Description
Public method SelectListItem() Initializes a new instance of the SelectListItem class using the default settings.
Public method SelectListItem(SelectListItem) Initializes a new instance of the SelectListItem class by copying the specified select list item.



  Name Description
Public property Selected Gets or sets a value that indicates whether the SelectListItem instance is selected.
Public property Text Gets or sets the text that is used to display the SelectListItem instance on a web page.
Public property Value Gets or sets the value of the HTML value attribute of the HTML option element that is associated with the SelectListItem instance.



  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)



The SelectListItem class represents a single HTML option element inside an HTML select list (an HTML select element) on a web page.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


System.Web.WebPages.Html Namespace