summaryM:DotNetNuke.Web.Mvc.Helpers.HtmlSelectExtensions.DropDownList(DotNetNuke.Web.Mvc.Helpers.DnnHtmlHelper,System.String,System.Collections.Generic.IEnumerable{System.Web.Mvc.SelectListItem},System.String)

Namespace: DotNetNuke.Web.Mvc.Helpers
Assembly: DotNetNuke.Web.Mvc (in DotNetNuke.Web.Mvc.dll)

Syntax

C#
public static MvcHtmlString DropDownList(
	this DnnHtmlHelper html,
	string name,
	IEnumerable<SelectListItem> selectList,
	string optionLabel
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function DropDownList ( 
	html As DnnHtmlHelper,
	name As String,
	selectList As IEnumerable(Of SelectListItem),
	optionLabel As String
) As MvcHtmlString

Parameters

html
Type: DotNetNuke.Web.Mvc.Helpers..::..DnnHtmlHelper
paramhtmlM:DotNetNuke.Web.Mvc.Helpers.HtmlSelectExtensions.DropDownList(DotNetNuke.Web.Mvc.Helpers.DnnHtmlHelper,System.String,System.Collections.Generic.IEnumerable{System.Web.Mvc.SelectListItem},System.String)
name
Type: System..::..String
paramnameM:DotNetNuke.Web.Mvc.Helpers.HtmlSelectExtensions.DropDownList(DotNetNuke.Web.Mvc.Helpers.DnnHtmlHelper,System.String,System.Collections.Generic.IEnumerable{System.Web.Mvc.SelectListItem},System.String)
selectList
Type: System.Collections.Generic..::..IEnumerable<(Of <(<'SelectListItem>)>)>
paramselectListM:DotNetNuke.Web.Mvc.Helpers.HtmlSelectExtensions.DropDownList(DotNetNuke.Web.Mvc.Helpers.DnnHtmlHelper,System.String,System.Collections.Generic.IEnumerable{System.Web.Mvc.SelectListItem},System.String)
optionLabel
Type: System..::..String
paramoptionLabelM:DotNetNuke.Web.Mvc.Helpers.HtmlSelectExtensions.DropDownList(DotNetNuke.Web.Mvc.Helpers.DnnHtmlHelper,System.String,System.Collections.Generic.IEnumerable{System.Web.Mvc.SelectListItem},System.String)

Return Value

returnsM:DotNetNuke.Web.Mvc.Helpers.HtmlSelectExtensions.DropDownList(DotNetNuke.Web.Mvc.Helpers.DnnHtmlHelper,System.String,System.Collections.Generic.IEnumerable{System.Web.Mvc.SelectListItem},System.String)

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DnnHtmlHelper. When you use instance method syntax to call this method, omit the first parameter. For more information, see [b8020aae-374d-46a9-bcb7-8cc2390b93b6] or [175ce3ff-9bbf-4e64-8421-faeb81a0bb51].

See Also