CHAPTER 39

image

Managing Scripts and Styles

In this chapter, we show you how the ASP.NET bundles feature works. This feature is new in ASP.NET 4.5, and it can simplify the management and maintenance of the script files and style sheets that an application uses. Bundles can also be used to optimize the requests that a browser has to make in order to get script files and style sheets, which we explain in detail.

Preparing the Example Project

For this chapter, we created a new project called ClientDev using the Visual Studio ASP.NET Empty Web Application project template. We need some NuGet packages for this chapter, so select Manage NuGet Packages

Get Pro ASP.NET 4.5 in C#, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.