0

I'm trying to use bundling in a project I have in ASP.net Webforms VB.net.

This is what I have done:

Added the reference to Web.Optimization Added the following in my Application_start in the global.asax

   BundleTable.EnableOptimizations = True
        BundleTable.Bundles.Add(New ScriptBundle("~/bundles/jsglobal").Include("~/js/inlineValidate.js"))

and the following in my master file

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

But it just show me this in the rendered page,

  <script src="/bundles/jsglobal"></script>

Which not only it doesn't have the unique query string but also it doesn't exist.

Not sure what the problem is, I did exactly the same thing in ASP.net MVC C# and it works fine.

user65248
  • 471
  • 1
  • 5
  • 17

1 Answers1

0

I think what you're seeing is expected. To test, turn BundleTable.EnableOptimizations to FALSE. Or just omit the line, it will be handled automatically.

ASP.NET MVC Bundle not rendering script files on staging server. It works on development server

Sea Charp
  • 288
  • 1
  • 6