I'm trying to use the new .net 4.5 webforms control to render bundles in my materpage. I have a scriptbundle defined in my BundleConfig.cs like this:
bundles.Add(new ScriptBundle("~/bundles/app").Include(
"~/Scripts/underscore.js",
"~/Scripts/backbone.js",
"~/Scripts/app/app.js",
"~/Scripts/app.validator.js",
"~/Scripts/app/views/home.js",
"~/Scripts/app/views/about.js",
"~/Scripts/app/views/contact.js",
"~/Scripts/app/controls/hello.js",
"~/Scripts/app/init.js"));
I then try to render the bundle using the new <webopt:BundleReference>
control:
<webopt:BundleReference ID="AppBundle" runat="server" Path="~/bundles/app" />
But when the page renders, the output is <link>
tags, rather than tags:
<link href="/Scripts/underscore.js" rel="stylesheet"/>
<link href="/Scripts/backbone.js" rel="stylesheet"/>
<link href="/Scripts/app/app.js" rel="stylesheet"/>
<link href="/Scripts/app/views/home.js" rel="stylesheet"/>
<link href="/Scripts/app/views/about.js" rel="stylesheet"/>
<link href="/Scripts/app/views/contact.js" rel="stylesheet"/>
<link href="/Scripts/app/controls/hello.js" rel="stylesheet"/>
<link href="/Scripts/app/init.js" rel="stylesheet"/>
Is this control meant to only render styles? Or am I doing something wrong? How can I render a script bundle using a webopt control and not the <%: Scripts.Render() %>
syntax?