SelectListItem Class
Represents the selected item in an instance of the SelectList class.
Namespace:
System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
The SelectListItem type exposes the following members.
| Name | Description | |
|---|---|---|
|
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
|
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
|
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetType | Gets the Type of the current instance. (Inherited from Object.) |
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
ToString | Returns a string that represents the current object. (Inherited from Object.) |
HTML Attributes
What about custom HTML Attributes? You can't add 'disabled', or custom HTML5 data- attributes out of the box in MVC3!
- 3/23/2012
- AlexMarshall
disabled attribute
There is no 'disabled' attribute. :(
Add the attribute "disabled" to the containing element. Remove "disabled" to enable it.
Add the attribute "disabled" to the containing element. Remove "disabled" to enable it.
- 10/27/2011
- 294de3557d9d00b3d2d8a1e6aab028cf
- 12/18/2011
- Mel Pama
Only option elements
It can only have option elements. What am I supposed to do with optgroups?
- 10/27/2011
- 294de3557d9d00b3d2d8a1e6aab028cf