Mich
Mich

Reputation: 151

ScriptBundle not rendering

I am really not sure what I have wrong

I have added a JavaScript file called ‘ListDrops-static.js’

I have added the bundle reference

    bundles.Add(new ScriptBundle("~/bundles/listdropstatic").Include(
                "~/Scripts/ListDrops-static.js"
                ));

and the on my _layout.cshtml I have added this

@Styles.Render("~/bundles/listdropstatic") 

And this just isn’t working

Upvotes: 0

Views: 56

Answers (1)

AlanMorton2.0
AlanMorton2.0

Reputation: 1053

This is because you are using @Styles.Render and not @Scripts.Render

this needs changing to this

@Scripts.Render

Upvotes: 2

Related Questions