HtmlOptionItemExtensionsToSelectListItems Method |
Maps an enumeration of
HtmlOptionItem to enumeration of
SelectListItem.
Namespace: Kentico.Web.MvcAssembly: Kentico.Web.Mvc (in Kentico.Web.Mvc.dll) Version: 13.0.131
Syntax public static IEnumerable<SelectListItem> ToSelectListItems(
this IEnumerable<HtmlOptionItem> listItems
)
Parameters
- listItems
- Type: System.Collections.GenericIEnumerableHtmlOptionItem
Return Value
Type:
IEnumerableSelectListItemUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableHtmlOptionItem. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also