News
Articles
Download
Algorithm
Code area
ASP.NET optimization - the choice of controls
4, controls the choice:
Html controls and the choice of server controls. Server control and the convenience function is the realization of html controls are not comparable. However, at the expense of server-side resources to the. My personal recommendation: If html controls can not be achieved by the function, but also, and some scripting language (such as javascrpt / vbscript) also can not be achieved with words. Will choose the server controls. Select the server controls, as also optimize its control, such as the removal of some pages status (see control of specific optimization)
Server controls the choice: The main control for several commonly used data illustrate the:
DataGrid: carrying the most powerful data controls, built-in changes to the data, delete, add, paging, and many other useful features. If you just show the data, so as not to choose DataGrid (which the data are stored in viewstate.) Should not use the built-in paging function, microsoft automatic paging in the bottom of a lot of work to do, despite the ease of use However, a large performance overhead.
DataList: DataGrid function less than a lot. However, since a lot of high definition. The unique multi-line data show that gives us a lot of convenience. DataGrid to achieve the functions of its basic be achieved. It is therefore proposed to use it.
Repeater: at least function, but since the definition of is very strong. If only the data show that the proposed use. As reduce a lot of functions, the performance of the server brought the minimum consumption. Therefore, if the data show, I basically Repeater and then choose the final DataGrid DataList
* Html controls as much as possible choices. In the client to achieve the functions of the client to achieve (master javascript), to reduce the pressure on the server. Data Control choose the order: Repeater, DataList, DataGrid
5, the optimization of the server controls:
1, Viewstate
Control of the viewstate and pages of the viewstate is basically the same. Used to preserve some state controls. The principle of handling and processing the same page viewstate. Are interested in the data can be used Datagrid binding under the test data kept by the viewstate of how much, it kept the basic and Datagrid data show that the volume of data is equivalent to the size.
2, Ispostpack
The default false. Need to have the case when it is set to be true.
Optimization of control, the main component of this you see familiar with the situation. To control the internal functioning of the principle of understanding, it will take a suitable optimization.
Performance Optimization is March 2 saying Not sure, I have written is only the tip of the iceberg, performance optimization is usually rely on the experience accumulated on the procedures and the operation of the principle of constant awareness.
View:(124) comments:(0)
Nickname:
comments:
About esoftwarefactory.com
|
Sitemap
|
Newletter
|
Tags
|
Advertise
Partners:
best dvd copy software
Copyright ©2008
Freeware shareware downloads
- esoftwarefactory.com, All Rights Reserved