Attempting to use css and js files with same virtualpath bundle name
1 - is it possible ? (tried:but failed. cant define same virtual path name both for script and style)
2 - it it possible to builtup a ScriptAndStyleBundle together included with a mixed bundle ?
Just because I wantto use same name both for css and js.
//in BundleConfig.cs
bundles.Add(new ScriptBundle("~/bundles/doMenu")
.Include("~/Plugins/doMenu/files/js/doMenu.js")
);
bundles.Add(new StyleBundle("~/bundles/doMenu")
.Include("~/Plugins/doMenu/files/css/doMenu.css")
);
//in _PartialLayoutMenu.cs
@Scripts.Render("~/bundles/doMenu")
@Styles.Render("~/bundles/doMenu")
result is:
<!--MENU LAYOUT-->
<script src="/Plugins/doMenu/files/css/doMenu.css"></script>
<link href="/Plugins/doMenu/files/css/doMenu.css" rel="stylesheet"/>
<!--/MENU LAYOUT-->
any clue ? or I want such a useless mind ?(thanks)
I'm using Cassette, which does support this feature.
Configuration:
BundleNames
is a helper class I have with constant strings.Reference bundles in views:
As you'd expect, this will include all CSS and JS, in the correct order.
I'd also mention that I've started using Cassette before ASP.Net had bundle management and I'm very happy with it. I didn't find any interesting feature ASP.Net had that I'm missing.