Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.netÐÔÄÜ

 1.¹Ø±Õ²»±ØÒªµÄSession
<%@ Page EnableSessionState="flase"%>
2.¹Ø±Õ²»±ØÒªµÄViewState
<asp:DataGrid EnableViewState="false" runat="server">
Èç¹ûÒ³Ã漶
<%@ Page EnableViewState="false"%>
3.²»ÒªÊ¹ÓÃException¿ØÖƳÌÐòÁ÷³Ì
  ExceptionÊǺܺÄ×ÊÔ´µÄ
4.½ûÓÃVBºÍJScript¶¯Ì¬Êý¾ÝÀàÐÍ
¶¯Ì¬Êý¾ÝÀàÐÍÊÇÒªÕ¼ÓôóÁ¿µÄCPUÔËÐÐʱ¼ä
<%@ Page Language="VB" Strict="true"%>
5.ʹÓô洢¹ý³ÌµÄÊý¾Ý·ÃÎÊ
6.Ö»¶ÁÊý¾Ý·ÃÎʲ»ÒªÊ¹ÓÃDataSet(DataSetÊǶϿªÁ¬½ÓµÄ,´æ´¢ÔÙÄÚ´æÖÐ,ËùÒÔ×ÊÔ´µÄÏûºÄ¾Þ´ó)
 Ê¹ÓÃSqlDataReader´úÌæDataSet
 SqlDataReaderÊÇread-only,forward-only
7.¹Ø±ÕASP.NETµÄDebugģʽ,²¿ÊðʱÊÇÔÙweb.configÖÐÈ¡ÏûDebug.
8.ASP.NETÊä³ö»º³å
Ò³Ã滺³å:
<% OutputCache Duration=60 VaryByParam="None"%>
   Duration=ÑÓ³Ùʱ¼ä;
   VaryByParam=¿Ø¼þid,ÀýÈçVaryParam="TextBox1";
   Çв»¿É×÷ÎÞΪµÄ»º³å;
Ƭ¶Ï»º³å :VaryByControl
asp.netеĶÔÏóCacheÓÚApplication¶ÔÏó¾ßÓÐÏàͬµÄ×÷ÓÃÓò
Cache.Insert("MyData",Source,new CacheDependency(Server.MapPath("authors.xml")));
¾ø¶Ô¹ýÆÚ
Cache.Insert("MyData",Source,null,DataTime.Now.AddHours(1),TimeSpan.Zero);
Ïà¶Ô¹ýÆÚ
Cache.Insert("Mydata",Source,null,DataTime,MaxValue,TimeSpan.fromMinutes(20));


Ïà¹ØÎĵµ£º

ASP.NETÒ³Ãæ¶ÔÏó

          »ñÈ¡ ASP.NET ÌṩµÄµ±Ç° Session ¶ÔÏó ( HttpSessionState Àà )¡£¸ÃÊôÐÔÌṩÓйص±Ç°ÇëÇóµÄ»á»°µÄÐÅÏ¢¡£Îª´Ó ASP.NET Ó¦ÓóÌÐòÇëÇóÒ³»òÎĵµµÄÿ¸öÓû§Î¬»¤Ò»¸ö Session ¶ÔÏó¡£µ±Óû§ÔÚÓ¦ÓóÌÐòÖдÓÒ»Ò³Òƶ¯µ½Áíһҳʱ£¬´æ´¢ÔÚ Session ¶ÔÏóÖеıäÁ¿²»»á±»·ÅÆú£»Ïà ......

asp.netÖÐapp_codeºÍbinÎļþ¼Ð½éÉÜ

       Èç¹ûÄúµÄ Web Ó¦ÓóÌÐò°üÀ¨ÒªÔÚ¶à¸öÒ³Ö®¼ä¹²ÏíµÄ´úÂ룬Äú¿ÉÒÔ½«´úÂë±£´æÔÚ Web Ó¦ÓóÌÐò¸ùĿ¼ÏµÄÁ½¸öÌØÊâÎļþ¼Ð£¨Bin Îļþ¼ÐºÍ App_Code Îļþ¼Ð£©ÖеÄij¸öÎļþ¼ÐÖС£
Bin Îļþ¼Ð
      ¿ÉÒÔÔÚ Bin Îļþ¼ÐÖд洢±àÒëµÄ³ÌÐò¼¯£¬²¢ÇÒ Web Ó¦ÓóÌÐòÈÎÒâ´¦µ ......

ASP.NET MVC Best Practices 27+

12 ASP.NET MVC Best Practices
M
DomainModel != ViewModel
Use ActionFilters for “shared” data
V
Do NEVER user code-behind
Write HTML each time you can
If there is an if, write an HtmlHelper
Choose your view engine carefully
C
Delete the AccountController
Isolate Controllers fro ......

asp.net Ò³ÃæÓÒϽǵ¯³öÀàËÆQQ»òMSNµÄÏûÏ¢Ìáʾ

<HTML><HEAD>
<TITLE>ÍøÒ³ÌØЧ¹ÛÖ¹|JsCode.CN|---Ò³ÃæÓÒϽǵ¯³öÀàËÆQQ»òMSNµÄÏûÏ¢Ìáʾ</TITLE>
<SCRIPT language=JavaScript>
<!--
/**//*
**    ==================================================================================================
**&nbs ......

ASP.netÖÐlistview¿Ø¼þÓ÷¨

ListView »ù´¡
ListView ÊÇÄ£°åÇý¶¯µÄ¿Ø¼þ£¬ÕâÒâζ×ÅËüĬÈÏÇé¿öϲ»»á³ÊÏÖÈκÎÊý¾Ý——Äú±ØÐëÒÔÄ£°åµÄÐÎʽÍêÈ«Ö¸¶¨Ï£ÍûËü³ÊÏÖµÄ HTML¡£Óë´ó¶àÊýÄ£°å¿Ø¼þÀàËÆ£¬ItemTemplate ½«³ÉΪÄú¹¤×÷µÄÖص㣬ÄúÐèÒª½«°ó¶¨Êý¾Ý¼¯ÖÐÿһÐ⻶ÏÖظ´µÄ HTML ÄÚÈÝ·ÅÔÚ ItemTemplate Àï¡£
ListView ÖеÄй¦ÄÜ£¬Ò²ÊÇËüÓëÆäËü¿Ø¼þµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ