Learn ASP.NET (4): a little notes attending online training

xiaoxiao2021-03-06  80

ASP.NET performance is improved. Using ISPOSTBACK

. Close unnecessary session status <% @ Page EnableSessionState = "false"%> Note Use Server Control. You don't use Server Control. You can close ViewState. Disable the entire page: <% @ Page EnableViewState =" false "%> Each Server Control has ViewState properties,

Don't use the Exception control program process try {result = 100 / num;} catch (exception e) {} to rewrite: if (num = 0) ...

Disable the VB and JScrip dynamic data types write this flag:. <% @ Page language = "vb" strict = "true"%> Because ASP.NET is compatible with ASP. Use stored procedure data access. Read-only data access Don't use DataSet Use SqlDataReader instead of DataSet.sqldataReader is Read0-Only, forward-only. Close the ASP.NET's debug mode. Use the ASP.NET OUTPUT Cache buffer data. The combination of page buffer buffer parameters will increase geometric level. If The following VaryByParam = "None" is added to the top of the page is added to the top of the page, and itbook = "textbox1"%> .duration .varybyparam. Piece buffer (OutputCache above UserControl, ie into a broken buffer) Another possible possibility (a control two instances), so add .varybyControl

The data is placed in APLICATION, SESSION, and added Cache .. Expired dependent Cache.Insert ("MyData", Source, New Cachedependency ("MyAuth.xml"))); absolute: cache. Insert ("MyData", Source, Null, DateTime.Now.Addhours (10, Timespan.zero); relative: ...

转载请注明原文地址:https://www.9cbs.com/read-120536.html

New Post(0)