使用Asp.NET MVC运行Ext.js 5应用程序

时间:2014-11-28 05:45:24

标签: asp.net asp.net-mvc extjs extjs5

我在Scripts / Ext文件夹中的Asp.NET MVC应用程序上使用Sencha Cmd创建ExtJs 5测试应用程序:

enter image description here

我已在Scripts / Ext文件夹中使用index.html文件成功运行它: enter image description here

我的脚本文件夹位于localhost:63059 / Scripts:

localhost:63059/Scripts/Ext/app.js
localhost:63059/Scripts/Ext/bootstrap.js
localhost:63059/Scripts/Ext/bootstrap.json
localhost:63059/Scripts/Ext/app/Application.js
etc...

开始页面网址:localhost:63059 /或localhost:63059 / Home / Index /

我在_Layout.cshtml中添加了bootstrap.js:

<script id="microloader" type="text/javascript" src="~/Scripts/Ext/bootstrap.js"></script>

但是当我尝试在HomeController IndexAction中运行它时,我有错误: localhost:63059 / bootstrap.json无法加载资源:服务器响应状态为404(未找到)

如何使用Sencha Cmd将默认Web路径更改为生成的ext应用程序?

1 个答案:

答案 0 :(得分:0)

尝试加载bootstrap,如下所示将脚本放在内容文件夹中

   <script src="@Url.Content("~/Content/js/libs/bootstrap.js")" type="text/javascript"></script>