Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using bundles in existing webforms project

I have an existing web forms project that is now using .net 4.5.

Using nuget I added the reference to system.web.omtimization.

I then placed in the header and also tried near my footer:

 <%: Scripts.Render("~/Scripts/CaseReview") %>

Also I add the following to global.asax:

BundleConfig.RegisterBundles(BundleTable.Bundles);

I am getting: The name 'Scripts' does not exist in the current context

I can use bundling with webforms yeah?

If so what am I doing wrong/not doing?

like image 711
Simon Avatar asked Jun 19 '13 15:06

Simon


1 Answers

Seems this did the job:

<%: System.Web.Optimization.Scripts.Render("~/Scripts/CaseReview") %>
like image 52
Simon Avatar answered Sep 29 '22 06:09

Simon