Adding to script bundle from partial view in .NET MVC 5

后端 未结 3 1710
悲&欢浪女
悲&欢浪女 2020-12-15 01:39

We are making a .Net MVC websolution that is going to be using widgets rendered as HTML.Partials(). We would like to be able for the partial view to add its dependencys in t

3条回答
  •  温柔的废话
    2020-12-15 01:43

    You would need to create a new bundle for each widget, otherwise if you re-use the "~/widgetspecific" bundle it will continue to add the scripts from the previous page's widget as you navigate through your site.

提交回复
热议问题