dimanche 10 mai 2015

MVC 4 bundleconfig.cs files not including in layout.cshtml

BundleConfig.cs

public class BundleConfig
{
    public static void RegisterBundles(BundleCollection bundles)
    {

        bundles.Add(new StyleBundle("~/resources/css").Include("~/resources/css/reset.css", 
            "~/resources/css/style.css", "~/resources/css/invalid.css"));

        bundles.Add(new ScriptBundle("~/resources/scripts").Include("~/resources/scripts/jquery-1.3.2.min.js",

            "~/resources/scripts/simpla.jquery.configuration.js", "~/resources/scripts/facebox.js",
            "~/resources/scripts/jquery.wysiwyg.js"));
    }
}

Layout.cshtml

 @Styles.Render("~/resources/css")
 @Scripts.Render("~/resources/scripts")

What it renders in html

 <link href="/resources/css" rel="stylesheet"/>
<script src="/resources/scripts"></script>

Not including css and js file paths in html ??

Aucun commentaire:

Enregistrer un commentaire