How to use multiple select in mvc 4?

前端 未结 2 985
野趣味
野趣味 2021-02-12 18:10

I want to use multiple select in Chosen. I have Skill model like,

public class Skill 
    {
        public int Id { get; set; }
        public string Name { ge         


        
2条回答
  •  臣服心动
    2021-02-12 18:44

    as other dudes mentioned, it seems your problem cause is not server-side (razor), it's actually client-side (most probably your Jquery plugin initialization).

    probably when the plugin initialization called the html DOM is not generated yet, put your plugin initialization script at the end of the body or inside $(document).ready() and don't forget to take a look at the console to see if there is any errors

    happy coding

提交回复
热议问题