Adding a css class to select using @Html.DropDownList()

后端 未结 10 1743
情深已故
情深已故 2020-11-30 01:13

I\'m building my first MVC application after years of doing webforms, and for some reason I am not able to make this work:

@Html.DropDownList(\"PriorityID\"         


        
10条回答
  •  再見小時候
    2020-11-30 01:41

    If you are add more than argument ya dropdownlist in Asp.Net MVC. When you Edit record or pass value in view bag.

    Use this it will be work:-

    @Html.DropDownList("CurrencyID",null,String.Empty, new { @class = "form-control-mandatory" })
    

提交回复
热议问题