Click or drag to resize
HtmlOptionItemExtensionsToSelectListItems Method
Maps an enumeration of HtmlOptionItem to enumeration of SelectListItem.

Namespace: Kentico.Web.Mvc
Assembly: Kentico.Web.Mvc (in Kentico.Web.Mvc.dll) Version: 13.0.131
Syntax
C#
public static IEnumerable<SelectListItem> ToSelectListItems(
	this IEnumerable<HtmlOptionItem> listItems
)

Parameters

listItems
Type: System.Collections.GenericIEnumerableHtmlOptionItem

Return Value

Type: IEnumerableSelectListItem

Usage 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