Amitabh
Amitabh

Reputation: 61237

Using MS Ajax Minfier 4.0 for Asp.Net MVC 2.0?

I am planning to use MS Ajax Minifier with Asp.Net MVC 2.0 for handling the Js and Css files. Does anyone has experience with MS Ajax Minifier? I have following questions regarding this.

  1. Is it the best way to use JS/CSS files in Asp.Net MVC or is there a better way. E.g. YUI Compressor, Telerik Extension for MVC?
  2. As I understand we can use this to convert SomeFile.js to SomeFile.min.js at the build time. However In my mvc Views I still have the Script reference pointing to SomeFile.js. How does the browser will pick the SomeFile.min.js file?

Upvotes: 1

Views: 234

Answers (1)

Kris van der Mast
Kris van der Mast

Reputation: 16613

  1. It's one possibility to use. The integration when building is a nice asset and it has hypercrunching.
  2. You must use the SomeFile.min.js in your script reference. But in Visual Studio you can have an uncompressed file with this name SomeFile-vsdoc.js for intellisense coding (in which you can also use xml comments which will be picked up by VS.

Another approach would be to use SquishIt.

Grz, Kris.

Upvotes: 1

Related Questions