jQuery UI的MVC与4 [英] jQuery UI with MVC 4
问题描述
我有ASP.Net MVC 4 Internet应用程序,我使用'微软'jQuery UI的它。我尝试了所有的步骤,在建议
http://jqueryuihelpers.apphb.com/Docmo/GettingStarted
I have ASP.Net MVC 4 Internet Application and I am using 'redmond' jQuery UI for it. I tried all the steps suggested at http://jqueryuihelpers.apphb.com/Docmo/GettingStarted
仍然只,对话和框架图标是在UI主题中可见的所有其他控件都在正常的主题。
still only, Dialog and Framework Icons are visible in UI theme all other controls are in normal theme.
我在〜/内容/主题文件夹复制的微软文件夹。
复制在〜/脚本文件夹中的.js文件。
I copied the redmond folder in~/ Content/themes folder. Copied the .js files in ~/scripts folder.
新增继BundleConfig.cs捆绑,
Added following bundle in BundleConfig.cs,
bundles.add(new stylebundle("~/content/themes/base/css").include(
"~/content/themes/redmond/jquery-ui-1.9.2.custom.css",
"~/content/themes/redmond/jquery-ui-1.9.2.custom.min.css"));
新增以下4 MVC应用程序中的Site.Master参考,
Added following reference in Site.Master of MVC 4 application,
<link href="<%: Url.Content("~/Content/themes/redmond/jquery-ui-1.9.2.custom.css") %>" type="text/css" rel="stylesheet" />
我试过的Razor视图引擎,以及在ASPX(C#)视图引擎使用jQuery UI,两者都显示jQuery UI的主题,只有对话和框架图标,如按钮和手风琴等所有其他控件都没有jQuery中UI的主题。
I tried using the jQuery UI in Razor view engine as well as in ASPX (C#) view engine, both are showing only Dialog and Framework Icons in jQuery UI theme, all other controls like buttons and accordion etc. are not in jQuery UI theme.
任何猜测,到底发生了什么?
Any guesses, what might have happened?
推荐答案
添加以下脚本头部,而不是身体
Add the following scripts to the head instead of the body
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryui")
这篇关于jQuery UI的MVC与4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!