Compartir a través de


DefaultHtmlGenerator.GenerateGroupsAndOptions Método

Definición

Genera <elementos optgroup> y <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

Parámetros

optionLabel
String

Texto opcional para un elemento de opción> vacío predeterminado<.

selectList
IEnumerable<SelectListItem>

Colección de SelectListItem objetos usados para generar <elementos optgroup> y <option> .

Devoluciones

Instancia IHtmlContent de los <elementos optgroup> y <option> .

Implementaciones

Se aplica a