How to implement multiple select in MVC 3 using 'chosen.js' plugin

后端 未结 4 664
一生所求
一生所求 2021-02-04 18:34

How to implement chosen plugin for MVC 3 ?

for this type of output

\"enter

4条回答
  •  醉话见心
    2021-02-04 19:15

    I have reconfigure chosen plugin as below and working properly.

    My razor :

    @Html.ListBox( "Emailaddress", ViewBag.EmailaddressList as MultiSelectList, new { @class = "chosen-select", data_placeholder = "Choose a Emailaddress...", style = "width:750px;", tabindex = "4" } )

    Add this script after your html Razor code

    
            
    

    My viewbag :

    ViewBag.Skills = new MultiSelectList(EmailaddressList, "Id", "EmailId");
    

提交回复
热议问题