MVC4 jQuery UI does not work

后端 未结 4 549
刺人心
刺人心 2020-12-18 13:26

I cannot get jQuery UI working in my ASP.NET MVC4 application. I tried dialog and datepicker. Here is part of the code of my view.



        
4条回答
  •  别那么骄傲
    2020-12-18 13:50

    You will need to add a couple lines to your _Layout.cshtml to get jQuery UI working out of the box. First is the javascript bundle:

    @*you should already have this line*@
    @Scripts.Render("~/bundles/jquery")
    
    @*add this line*@
    @Scripts.Render("~/bundles/jqueryui")
    

    Next you need the CSS for jQuery UI as well:

    @*you should already have this line*@
    @Styles.Render("~/Content/css")
    
    @*add this line*@
    @Styles.Render("~/Content/themes/base/css")
    

提交回复
热议问题