C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




How to improve the performance of your asp.net application


Posted Date: 10 Mar 2004    Resource Type: Articles    Category: Web Applications
Author: ManojRajanMember Level: Gold    
Rating: Points: 10



Improve ASP.Net Performance


1. Use IsPostBack page method to check the page load status, your code may contain code blocks that you want to execute only when the page loads the first time, you can avoid call to this procedures if you check the status of the Page load.

2. Use View state for only those controls, what you really need. You can disable the viewstate for a control, there are various option from the application level to the control level (This is explained in another article in this site). So disable the viewstate for controls, which you don’t need.

3. Use HttpServerUtility, Most of the time we use response objects redirect method to redirect the request to another page, which will require another round back to the server, Which cause a delay in loading the page. Instead you can make use of Transfer or Execute method of HttpServerutility.

4. Use Stored Procedure for data access, instead of using long and complex SQL queries which need time to compile and execute.

5. You should only use sessions where they are actually required. You can turn off the session management at the page level.

6. Exception are good for error handling, but remember it takes a lot of the processing to try and catch, so use exception only when you really require it.

7. Use Output Caching for the pages where you have data, which are not changed too frequently. Also remember too many caching pages too can degrade the performance of your application.

8. Use Server side controls only where appropriate.

9. For accessing MS SQL Server database , don’t use System.Data.OleDb namespace, instead use System.Data.SqlClient. This namespace provides classes, which are much faster and more efficient.

10. User DataBinding, Normally we use a rowset to dynamically load the data to a control, wherever possible make use of the data binding capabilities of the control.

11. Use Early bindings, it’s a general practice to declare variables of object type and later convert it to the type, which we require, to process. This takes too much memory and processing. So wherever possible make use of the correct type for the variables. To strictly follow this, make use of Option Strict and Option Explicit in the beginning of the code block.











Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: What is Caching?
Previous Resource: Dynamically Show or Hide datagrid columns
Return to Discussion Resource Index
Post New Resource
Category: Web Applications


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use