SelectExtensions.EnumDropDownListFor Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
EnumDropDownListFor<TModel,TEnum>(HtmlHelper<TModel>, Expression<Func<TModel,TEnum>>) |
Returns an HTML select element for each value in the enumeration that is represented by the specified expression. |
EnumDropDownListFor<TModel,TEnum>(HtmlHelper<TModel>, Expression<Func<TModel,TEnum>>, IDictionary<String,Object>) |
Returns an HTML select element for each value in the enumeration that is represented by the specified expression. |
EnumDropDownListFor<TModel,TEnum>(HtmlHelper<TModel>, Expression<Func<TModel,TEnum>>, Object) |
Returns an HTML select element for each value in the enumeration that is represented by the specified expression. |
EnumDropDownListFor<TModel,TEnum>(HtmlHelper<TModel>, Expression<Func<TModel,TEnum>>, String) |
Returns an HTML select element for each value in the enumeration that is represented by the specified expression. |
EnumDropDownListFor<TModel,TEnum>(HtmlHelper<TModel>, Expression<Func<TModel,TEnum>>, String, IDictionary<String,Object>) |
Returns an HTML select element for each value in the enumeration that is represented by the specified expression. |
EnumDropDownListFor<TModel,TEnum>(HtmlHelper<TModel>, Expression<Func<TModel,TEnum>>, String, Object) |
Returns an HTML select element for each value in the enumeration that is represented by the specified expression. |
EnumDropDownListFor<TModel,TEnum>(HtmlHelper<TModel>, Expression<Func<TModel,TEnum>>)
Returns an HTML select element for each value in the enumeration that is represented by the specified expression.
public static System.Web.Mvc.MvcHtmlString EnumDropDownListFor<TModel,TEnum> (this System.Web.Mvc.HtmlHelper<TModel> htmlHelper, System.Linq.Expressions.Expression<Func<TModel,TEnum>> expression);
static member EnumDropDownListFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Enum>> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function EnumDropDownListFor(Of TModel, TEnum) (htmlHelper As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TEnum))) As MvcHtmlString
Type Parameters
- TModel
The type of the model.
- TEnum
The type of the value.
Parameters
- htmlHelper
- HtmlHelper<TModel>
The HTML helper instance that this method extends.
- expression
- Expression<Func<TModel,TEnum>>
An expression that identifies the object that contains the values to display.
Returns
An HTML select element for each value in the enumeration that is represented by the expression.
Applies to
EnumDropDownListFor<TModel,TEnum>(HtmlHelper<TModel>, Expression<Func<TModel,TEnum>>, IDictionary<String,Object>)
Returns an HTML select element for each value in the enumeration that is represented by the specified expression.
public static System.Web.Mvc.MvcHtmlString EnumDropDownListFor<TModel,TEnum> (this System.Web.Mvc.HtmlHelper<TModel> htmlHelper, System.Linq.Expressions.Expression<Func<TModel,TEnum>> expression, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
static member EnumDropDownListFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Enum>> * System.Collections.Generic.IDictionary<string, obj> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function EnumDropDownListFor(Of TModel, TEnum) (htmlHelper As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TEnum)), htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString
Type Parameters
- TModel
The type of the model.
- TEnum
The type of the value.
Parameters
- htmlHelper
- HtmlHelper<TModel>
The HTML helper instance that this method extends.
- expression
- Expression<Func<TModel,TEnum>>
An expression that identifies the object that contains the values to display.
- htmlAttributes
- IDictionary<String,Object>
An object that contains the HTML attributes to set for the element.
Returns
An HTML select element for each value in the enumeration that is represented by the expression.
Applies to
EnumDropDownListFor<TModel,TEnum>(HtmlHelper<TModel>, Expression<Func<TModel,TEnum>>, Object)
Returns an HTML select element for each value in the enumeration that is represented by the specified expression.
public static System.Web.Mvc.MvcHtmlString EnumDropDownListFor<TModel,TEnum> (this System.Web.Mvc.HtmlHelper<TModel> htmlHelper, System.Linq.Expressions.Expression<Func<TModel,TEnum>> expression, object htmlAttributes);
static member EnumDropDownListFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Enum>> * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function EnumDropDownListFor(Of TModel, TEnum) (htmlHelper As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TEnum)), htmlAttributes As Object) As MvcHtmlString
Type Parameters
- TModel
The type of the model.
- TEnum
The type of the value.
Parameters
- htmlHelper
- HtmlHelper<TModel>
The HTML helper instance that this method extends.
- expression
- Expression<Func<TModel,TEnum>>
An expression that identifies the object that contains the values to display.
- htmlAttributes
- Object
An object that contains the HTML attributes to set for the element.
Returns
An HTML select element for each value in the enumeration that is represented by the expression.
Applies to
EnumDropDownListFor<TModel,TEnum>(HtmlHelper<TModel>, Expression<Func<TModel,TEnum>>, String)
Returns an HTML select element for each value in the enumeration that is represented by the specified expression.
public static System.Web.Mvc.MvcHtmlString EnumDropDownListFor<TModel,TEnum> (this System.Web.Mvc.HtmlHelper<TModel> htmlHelper, System.Linq.Expressions.Expression<Func<TModel,TEnum>> expression, string optionLabel);
static member EnumDropDownListFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Enum>> * string -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function EnumDropDownListFor(Of TModel, TEnum) (htmlHelper As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TEnum)), optionLabel As String) As MvcHtmlString
Type Parameters
- TModel
The type of the model.
- TEnum
The type of the value.
Parameters
- htmlHelper
- HtmlHelper<TModel>
The HTML helper instance that this method extends.
- expression
- Expression<Func<TModel,TEnum>>
An expression that identifies the object that contains the values to display.
- optionLabel
- String
The text for a default empty item. This parameter can be null.
Returns
An HTML select element for each value in the enumeration that is represented by the expression.
Applies to
EnumDropDownListFor<TModel,TEnum>(HtmlHelper<TModel>, Expression<Func<TModel,TEnum>>, String, IDictionary<String,Object>)
Returns an HTML select element for each value in the enumeration that is represented by the specified expression.
public static System.Web.Mvc.MvcHtmlString EnumDropDownListFor<TModel,TEnum> (this System.Web.Mvc.HtmlHelper<TModel> htmlHelper, System.Linq.Expressions.Expression<Func<TModel,TEnum>> expression, string optionLabel, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
static member EnumDropDownListFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Enum>> * string * System.Collections.Generic.IDictionary<string, obj> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function EnumDropDownListFor(Of TModel, TEnum) (htmlHelper As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TEnum)), optionLabel As String, htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString
Type Parameters
- TModel
The type of the model.
- TEnum
The type of the value.
Parameters
- htmlHelper
- HtmlHelper<TModel>
The HTML helper instance that this method extends.
- expression
- Expression<Func<TModel,TEnum>>
An expression that identifies the object that contains the values to display.
- optionLabel
- String
The text for a default empty item. This parameter can be null.
- htmlAttributes
- IDictionary<String,Object>
An object that contains the HTML attributes to set for the element.
Returns
An HTML select element for each value in the enumeration that is represented by the expression.
Applies to
EnumDropDownListFor<TModel,TEnum>(HtmlHelper<TModel>, Expression<Func<TModel,TEnum>>, String, Object)
Returns an HTML select element for each value in the enumeration that is represented by the specified expression.
public static System.Web.Mvc.MvcHtmlString EnumDropDownListFor<TModel,TEnum> (this System.Web.Mvc.HtmlHelper<TModel> htmlHelper, System.Linq.Expressions.Expression<Func<TModel,TEnum>> expression, string optionLabel, object htmlAttributes);
static member EnumDropDownListFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Enum>> * string * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function EnumDropDownListFor(Of TModel, TEnum) (htmlHelper As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TEnum)), optionLabel As String, htmlAttributes As Object) As MvcHtmlString
Type Parameters
- TModel
The type of the model.
- TEnum
The type of the value.
Parameters
- htmlHelper
- HtmlHelper<TModel>
The HTML helper instance that this method extends.
- expression
- Expression<Func<TModel,TEnum>>
An expression that identifies the object that contains the values to display.
- optionLabel
- String
The text for a default empty item. This parameter can be null.
- htmlAttributes
- Object
An object that contains the HTML attributes to set for the element.
Returns
An HTML select element for each value in the enumeration that is represented by the expression.