【问题标题】:jQuery UI with MVC 4带有 MVC 4 的 jQuery UI
【发布时间】:2013-05-04 00:41:08
【问题描述】:

我有 ASP.Net MVC 4 Internet 应用程序,我正在使用 'redmond' jQuery UI。我尝试了建议的所有步骤 http://jqueryuihelpers.apphb.com/Docmo/GettingStarted

仍然只有对话框和框架图标在 UI 主题中可见,所有其他控件都在普通主题中。

我将 redmond 文件夹复制到 ~/Content/themes 文件夹中。 将 .js 文件复制到 ~/scripts 文件夹中。

在 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"));

在 MVC 4 应用程序的 Site.Master 中添加了以下引用,

<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 中用户界面主题。

有什么猜测,可能发生了什么?

【问题讨论】:

    标签: jquery asp.net-mvc jquery-ui


    【解决方案1】:

    将以下脚本添加到头部而不是正文

    @Scripts.Render("~/bundles/jquery") 
    
    @Scripts.Render("~/bundles/jqueryui")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-04-30
      • 2014-10-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多