Introduction

This article gives a simple checklist that can simply be run against any ASP .NET Web Page to optimize it. This is in no way a complete list, however it should work for most of the web pages. For a performance critical application you will surely need to go beyond this checklist and will require a more detailed plan.

Checklist for all pages

Here is the list of checks that you need to run, not necessarily in order:

http://www.codeproject.com/images/minus.gifCollapse

//

// Try

// 'Create Db Connection and call a query

// sqlConn = New SqlClient.SqlConnection(STR_CONN)

// Catch ex As Exception

// 'Throw any Error that occurred

// Throw ex

// Finally

// 'Free Database connection objects

// sqlConn = Nothing

//End Try

//

http://www.codeproject.com/images/minus.gifCollapse

//

// <% @OutputCache Duration="60" VaryByParam="none" %>

//

Learn more about "VaryByParam" and "VaryByControl" for best results.

Additional Checklist for performance critical pages

http://www.codeproject.com/images/minus.gifCollapse

//

// <%@ Page EnableSessionState="false" %>

//

If the page only reads session but does not write anything in session, then make it read only.

http://www.codeproject.com/images/minus.gifCollapse

//

// '<%@ Page EnableSessionState="ReadOnly" %>

//