HtmlHelperExtensions.SelectOptions Method

Namespace:
Weavy.Web.Extensions
Assembly:
Weavy.Web.dll

SelectOptions(HtmlHelper, IEnumerable, int?)

Returns a list of <option> elements representing the specified entities.

public static MvcHtmlString SelectOptions(this HtmlHelper html, IEnumerable<IEntity> entities, int? selected = default(int? ))

Parameters

html
System.Web.Mvc.HtmlHelper
entities
System.Collections.Generic.IEnumerable

The entities for which to create options.

selected
int?

Id of selected entity.

Returns

System.Web.Mvc.MvcHtmlString