HtmlHelper.DropDownList Method

Include Protected Members
Include Inherited Members

Returns an HTML drop-down control for use in a web page.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Public method DropDownList(String, IEnumerable<SelectListItem>) Returns an HTML drop-down list control that has the specified name and that contains the specified list items.
Public method DropDownList(String, IEnumerable<SelectListItem>, IDictionary<String, Object>) Returns an HTML drop-down list control that has the specified name and custom attributes defined by an attribute dictionary, and that contains the specified list items.
Public method DropDownList(String, IEnumerable<SelectListItem>, Object) Returns an HTML drop-down list control that has the specified name and custom attributes defined by an attribute object, and that contains the specified list items.
Public method DropDownList(String, String, IEnumerable<SelectListItem>) Returns an HTML drop-down list control that has the specified name, and that contains the specified list items and default item.
Public method DropDownList(String, String, IEnumerable<SelectListItem>, IDictionary<String, Object>) Returns an HTML drop-down list control that has the specified name and custom attributes defined by an attribute dictionary, and that contains the specified list items and default item.
Public method DropDownList(String, String, IEnumerable<SelectListItem>, Object) Returns an HTML drop-down list control that has the specified name and custom attributes defined by an attribute object, and that contains the specified list items and default item.
Public method DropDownList(String, String, IEnumerable<SelectListItem>, Object, IDictionary<String, Object>) Returns an HTML drop-down list control that has the specified name, custom attributes defined by an attribute dictionary, and default selection, and that contains the specified list items and default item.
Public method DropDownList(String, String, IEnumerable<SelectListItem>, Object, Object) Returns an HTML drop-down list control that has the specified name, custom attributes defined by an attribute object, and default selection, and that contains the specified list items and default item.

Top

Remarks

The HTML drop-down control is returned as HTML markup that can be used to render the control in a web page.

See Also

Reference

HtmlHelper Class

System.Web.WebPages.Html Namespace