Monday , 25 October 2021
Breaking News

Optimize ASP.NET Pages to Improve Web Performance

http://www.seekdotnet.com

As you have been familiar with ASP.NET web development, you probably have heard about Data Grid, Data List and Repeater controls in ASP.NET. These features work wonders in ASP.NET development.  They help your webpage displaying data much faster and efficient that you should make the most of these features on your ASP.NET site.

I will breakdown the benefits of Data Grid, Data List and Repeater controls in this article. First, let’s 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.  This is a typical ASP.NET page execution procedure. 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.NET 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 should store their information, as well as many other functions. If you are not using the cache, you should be, whenever possible.
2. Use the standard ASP.NET controls if possible:
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. 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 SQL Data Reader

or even better use for the command set for SQL Server data retrieval and simply run that against a database. ASP.NET SQL Data Reader 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 SQL Data Reader, it’s because you are returning different sets of results. Set the command stored procedure that returns data via parameters, unlike the result set, which could then be repeated back to get your data.

For more information about ASP.NET hosting and ASP.NET web development, please visit http://www.seekdotnet.com.

[email protected] [email protected]