How to add Global.asax page to asp.net 4.5 version in C#? -
i have put css , javascript files reference in aspx page bundle(global.asax )file in 2013(4.5 version) visual studio. how can it?
try :
bundles.add(new stylebundle("~/allstyles").includedirectory("~/images","img.css") .includedirectory("~/content","con.css") .include("~/styles.css"))
in view page:
<%: styles.render("~/allstyles") %>
or
bundles.add(new stylebundle("~/bundles/img").include("~/images/img.css")) bundles.add(new stylebundle("~/bundles/content").include("~/content/con.css")) bundles.add(new stylebundle("~/bundles/style").include("~/styles.css"))
in view page:
<%: styles.render("~/bundles/img","~/bundles/content","~/bundles/style") %>
and remind must add in global.asax.cs file bundleconfig.registerbundles(bundletable.bundles);
Comments
Post a Comment