MultiSelectList Class
Represents a list of items that users can select more than one item from.
Inheritance Hierarchy
System.Object
System.Web.Mvc.MultiSelectList
System.Web.Mvc.SelectList
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Syntax
'Declaration
Public Class MultiSelectList _
Implements IEnumerable(Of SelectListItem), IEnumerable
public class MultiSelectList : IEnumerable<SelectListItem>,
IEnumerable
public ref class MultiSelectList : IEnumerable<SelectListItem^>,
IEnumerable
The MultiSelectList type exposes the following members.
Constructors
Name | Description | |
---|---|---|
MultiSelectList(IEnumerable) | Initializes a new instance of the MultiSelectList class by using the specified items to include in the list. | |
MultiSelectList(IEnumerable, IEnumerable) | Initializes a new instance of the MultiSelectList class by using the specified items to include in the list and the selected values. | |
MultiSelectList(IEnumerable, String, String) | Initializes a new instance of the MultiSelectList class by using the items to include in the list, the data value field, and the data text field. | |
MultiSelectList(IEnumerable, String, String, IEnumerable) | Initializes a new instance of the MultiSelectList class by using the items to include in the list, the data value field, the data text field, and the selected values. |
Top
Properties
Name | Description | |
---|---|---|
DataTextField | Gets or sets the data text field. | |
DataValueField | Gets or sets the data value field. | |
Items | Gets or sets the items in the list. | |
SelectedValues | Gets or sets the selected values. |
Top
Methods
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.) | |
GetEnumerator | Returns an enumerator that can be used to iterate through the collection. | |
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.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IEnumerable.GetEnumerator | Returns an enumerator can be used to iterate through a collection. |
Top
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.