DefaultHtmlGenerator.GenerateGroupsAndOptions Méthode

Définition

Génère des <éléments optgroup> et <option> .

public:
 virtual Microsoft::AspNetCore::Html::IHtmlContent ^ GenerateGroupsAndOptions(System::String ^ optionLabel, System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Mvc::Rendering::SelectListItem ^> ^ selectList);
public Microsoft.AspNetCore.Html.IHtmlContent GenerateGroupsAndOptions (string optionLabel, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> selectList);
abstract member GenerateGroupsAndOptions : string * seq<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> -> Microsoft.AspNetCore.Html.IHtmlContent
override this.GenerateGroupsAndOptions : string * seq<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function GenerateGroupsAndOptions (optionLabel As String, selectList As IEnumerable(Of SelectListItem)) As IHtmlContent

Paramètres

optionLabel
String

Texte facultatif pour un élément d’option> vide <par défaut.

selectList
IEnumerable<SelectListItem>

Collection d’objets SelectListItem utilisés pour générer des <éléments optgroup> et <option> .

Retours

Une IHtmlContent instance pour les <éléments optgroup> et <option>.

Implémente

S’applique à