adsense

Wednesday, November 21, 2018

Adding Web Optimization framework to ASP.Net Web forms

The ASP.Net Web Optimization Framework is used to optimize the ASP.NET web application performance by reducing the number of server requests and  the size of the requested resources.


Following article explains how to integrate the  ASP.Net Web Optimization Framework to to ASP.Net Web forms project. 

When the scripts are rendered in the master page a place holder is used to wrap the rendered scripts as shown below.

<head runat="server">
    <asp:PlaceHolder runat="server">
        <%: Scripts.Render("~/bundles/jquery") %>
        <%: Styles.Render("~/Content/bootstrap") %>
    </asp:PlaceHolder>
</head>

This ensures that bundles are rendered  properly.

Cheers,
Samitha

No comments:

Post a Comment