1
我正在使用Chosen ASP.NET MVC(Razor)項目的JQuery插件。對於下拉列表,它不顯示由data_placeholder
設置的默認文本值,而是顯示列表的第一項。默認文本不顯示在選擇(JQuery)DropDownList
<div class="editor-field">
@Html.DropDownList("AuthorId", (IEnumerable<SelectListItem>)ViewBag.AuthorId, new
{
@class = "chzn-dropdown",
data_placeholder = "Select Author...",
style = "width:270px;"
})
@Html.ValidationMessageFor(model => model.Author)
</div>
如何顯示下拉列表的默認文本?
感謝您的回答......我沒有在網站上看到它:) – Nalaka526