HtmlHelper.GenerateListBox 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.
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);
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
Parameters
- 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.
Returns
The IHtmlContent.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for