Many times, the web application goes slow down, after go live on a production server. There may be two reasons - hardware issues where you deployed the application or the CPU and memory usage are high due to not using resources efficiently inside your web application code.
Before starting to work on improving performance, you will have to understand that what is the cause of slowing down the web application. You have to reduce page load time, manage state and resources efficiently and improve data access performance in your ASP.Net applications, for that below are some best practices mentioned:
Use output caching.
Always set debug=false in a web.config before deployment on a production server.
Choose Session State management carefully into code.
Always deploy with Release Build on a production server.
Disable View State of a Page if possible into code.
Avoid Response.Redirect into your code.
Use StringBuilder to concatenate strings into your code.
Don't throw exceptions, always handle the exception into code.
Use "Finally Method" to kill resources into code.
Use Client-side Scripts for validations into code.
Avoid unnecessary round trips to the server into code.
Use Page.ISPostBack wherever it is required into code.
Include Return Statements within the Function/Method.
Use Foreach loop instead of For loop for String Iteration.
Avoid Unnecessary Indirection.
Always check Page.IsValid when using Validation Controls.
Use Paging to show data in the page.
Do Ajax calls instead of ASP.NET code behind code.
Store your content by using caching.
Use low cost authentication.
Minimize the number of web server controls.
Avoid making frequent calls across processes.
Remove the unused HTTPMODULES.
Use Reflection wisely if needed.
Avoid Recursive Functions / Nested Loops.
Use Ngen.exe to optimize managed code performance.