Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Best Practices to increase the performance of Asp.net websites
WhatsApp
Ankit Nandekar
13y
4.7
k
0
0
25
Blog
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.
Up Next
What is 3 Tier Architecture in ASP.NET C#
Ebook Download
View all
Printing in C# Made Easy
Read by 22.3k people
Download Now!
Learn
View all
Membership not found