HtmlHelper.GenerateListBox Method
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.
Generate a list box.
protected:
Microsoft::AspNetCore::Html::IHtmlContent ^ GenerateListBox(Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression, System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Mvc::Rendering::SelectListItem ^> ^ selectList, System::Object ^ htmlAttributes);
C#
protected Microsoft.AspNetCore.Html.IHtmlContent GenerateListBox (Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> selectList, object htmlAttributes);
member this.GenerateListBox : Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * seq<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Protected Function GenerateListBox (modelExplorer As ModelExplorer, expression As String, selectList As IEnumerable(Of SelectListItem), htmlAttributes As Object) As IHtmlContent
- modelExplorer
- ModelExplorer
The ModelExplorer.
- expression
- String
The expression.
- selectList
- IEnumerable<SelectListItem>
An enumeration of SelectListItem.
- htmlAttributes
- Object
An Object that contains the HTML attributes for the element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.
The IHtmlContent.
Product | Versions |
---|---|
ASP.NET Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |