SelectListItem Class
Represents an item in an HTML select list.
Inheritance Hierarchy
System.Object
System.Web.WebPages.Html.SelectListItem
Namespace: System.Web.WebPages.Html
Assembly: System.Web.WebPages (in System.Web.WebPages.dll)
Syntax
'Declaration
Public Class SelectListItem
'Usage
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.
Constructors
Name | Description | |
---|---|---|
SelectListItem() | Initializes a new instance of the SelectListItem class using the default settings. | |
SelectListItem(SelectListItem) | Initializes a new instance of the SelectListItem class by copying the specified select list item. |
Top
Properties
Name | Description | |
---|---|---|
Selected | Gets or sets a value that indicates whether the SelectListItem instance is selected. | |
Text | Gets or sets the text that is used to display the SelectListItem instance on a web page. | |
Value | Gets or sets the value of the HTML value attribute of the HTML option element that is associated with the SelectListItem instance. |
Top
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
ToString | (Inherited from Object.) |
Top
Remarks
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.