Bagikan melalui


DefaultHtmlGenerator.GenerateGroupsAndOptions Metode

Definisi

<Menghasilkan elemen optgroup> dan <opsi>.

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

Parameter

optionLabel
String

Teks opsional untuk elemen opsi> kosong <default.

selectList
IEnumerable<SelectListItem>

Kumpulan SelectListItem objek yang digunakan untuk menghasilkan <elemen optgroup> dan <opsi> .

Mengembalikan

Instans IHtmlContent untuk <elemen optgroup> dan <opsi> .

Penerapan

Berlaku untuk