新しい .net 4.5 webforms コントロールを使用して、マターページでバンドルをレンダリングしようとしています。次のように、BundleConfig.cs で定義された scriptbundle があります。
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"));
<webopt:BundleReference>次に、新しいコントロールを使用してバンドルをレンダリングしようとします。
<webopt:BundleReference ID="AppBundle" runat="server" Path="~/bundles/app" />
ただし、ページがレンダリングされると、出力は<link>タグではなくタグになります。
<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"/>
このコントロールはスタイルのみを表示するためのものですか? それとも私は何か間違ったことをしていますか?構文ではなく webopt コントロールを使用してスクリプト バンドルをレンダリングするにはどうすればよい<%: Scripts.Render() %>ですか?