HtmlHelper.GenerateDropDown 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
產生下拉式清單。
protected:
Microsoft::AspNetCore::Html::IHtmlContent ^ GenerateDropDown(Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression, System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Mvc::Rendering::SelectListItem ^> ^ selectList, System::String ^ optionLabel, System::Object ^ htmlAttributes);
protected Microsoft.AspNetCore.Html.IHtmlContent GenerateDropDown (Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> selectList, string optionLabel, object htmlAttributes);
member this.GenerateDropDown : Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * seq<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Protected Function GenerateDropDown (modelExplorer As ModelExplorer, expression As String, selectList As IEnumerable(Of SelectListItem), optionLabel As String, htmlAttributes As Object) As IHtmlContent
參數
- modelExplorer
- ModelExplorer
- expression
- String
運算式。
- selectList
- IEnumerable<SelectListItem>
選取清單。
- optionLabel
- String
選項標籤。
- htmlAttributes
- Object
Object,其中包含 專案的 HTML 屬性。 或者, IDictionary<TKey,TValue> 包含 HTML 屬性的實例。