If you know the internet and all website development to Asp.Net you will need to know about the wonders Data Grid, Data list and Repeater controls in Asp.net. Although each has its place, if you are only displaying data is much faster and more efficient means to do so.Say you have a page that displays articles based on articles query string. Each article is stored in the database and displayed on the page based on a unique id article as stored in the database.
Typical asp page execution procedure is something like that. Code queries the database using id article and then back, which provides information on the page where you can view in the style that you want. It is sufficiently straight forward approach with ASP and runs all the time.So how do we speed up our asp.net pages?
There are a few tips to perform this task:
1. Use Caching:
In fact on the ground in a database query each time a page is loaded, you can search the database only once and load
that result into the cache. Following calls to load the page retrieve the data from the cache to prevent the database, which gives you very fast and significant increase in performance. Then you can set how long cache cache should store their information, as well as many other functions. If you are not using the cache, you should be, whenever possible.
2 If possible, use the standard Asp.Net controls:
Asp.net standard controls are designed for rapid development and not page performance. They allow you to design sites that capture and display of data very quickly but their actual performance suffers because many times, that is there for ease and speed development time and not page execution speed.Use either a User Control or even better Web Custom Control which is by far the fastest performance wise and really
easy to create and use.
3. Use SqlDataReader or even better use for the command set for SQL Server data retrieval and simply run that against a database.Asp.net SqlDataReader is only data reader fast-forward, it closes the connection after reading the last results. If you have more than 1 result returned in content as you use SqlDataReader because you are returning different sets of results.Set the commands are stored procedures that return of data via parameters, unlike the result set, which can then be looped back to get your data. So instead of writing stored procedures like this, which brings back 1 result set?
For more info visit- http://www.uniquesofts.com/e-business-solutions.php and http://www.uniquesofts.com/web-development.php
Tags: Internet Marketing Company India Web Development Company India Offshore