MVC捆绑包:如何在视图中添加资产并使它们与主布局页面捆绑包一起呈现 [英] MVC Bundles: How to add assets in views and have them render combined with the main layout page bundle

查看:51
本文介绍了MVC捆绑包:如何在视图中添加资产并使它们与主布局页面捆绑包一起呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在telerik scriptregistrar和卡带包中,您可以从视图和局部文件中添加脚本,并将其注册并与主布局页面中的其余脚本进行组合,并全部渲染正确地一起放在页面的末尾.可以在MVC 4中以相同的方式完成此操作吗?到目前为止,我还没有看到如何将视图中的其他捆绑包添加到要合并和最小化的主要捆绑包中?

In the telerik scriptregistrar and also the cassette package, you can add scripts from views and partials and have them registered and combined with the rest of the scripts in the main layout page and have them all render correctly at the end of the page together. Can this be done in the same way in MVC 4? So far, I don't see how to add additional bundles from views to the main bundle to be combined and minimified?

推荐答案

在MVC4中无法立即使用.坚持盒式磁带

Can't be done out of the box in MVC4. Sticking with Cassette

这篇关于MVC捆绑包:如何在视图中添加资产并使它们与主布局页面捆绑包一起呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆