TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Best Practices to increase the performance of Asp.net websites
Ankit Nandekar
May 26, 2011
4.6
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
This are some tips to increase your website performance.
Best Practices to increase the performance of Asp.net websites.
For any webApplication performance is the key area where any developer need to look in .
Here are the best practices to increase the performance of the application using Asp.net
Always set debug=”false” in web.config production environment.
Always set trace=”false” in web.config production environment
Always use precompiled version of your code and also prefer web application project over website.
Always compile your project in Release Mode before uploading application to production environment.
Decrease your html kb as much as you can for that use tables less html using div's and if possible then do not give big name to your control it will increase your html kb as asp.net uses client Id to differentiate all the controls.
Use caching wherever posssible
Remove blank spaces from your html it will increase your kb.
use master pages to increase your performance.
Prefer database reader over dataset unless and until you have specific reason to use database.
Disable view state for your controls if possible.
User Server.Transfer instead of response.redirect.
Always use inproc session state if possible.
Use Ajax for your application wisely. Lots of Ajax calls for a page will also decrease your performance.
User System.Text.StringBuilder for string concatenation its 4 times more faster then the normal strings.
Right JavaScript in .Js files and place it as bottom of the application.
Use Separate CSS files for styling of application.
Use coustom paging over normal paging while displaying huge amount of data in datacontrols
Use Client Side Scripts for validations
Use Stored Procedures Wherever Possible
Best Practices to increase the performance of Asp.net websites.
Next Recommended Reading
What is 3 Tier Architecture in ASP.NET C#