asp.net ÄÚ²¿ÔËÐлúÖÆ
1.ASP.NETÔËÐÐÔÀí¸ÅÊö
ÈçÉÏͼ£¬µ±Ò»¸öhttpÇëÇó·¢Ë͹ýÀ´²¢±»IIS»úÊÕµ½Ö®ºó,IISÊ×ÏÈͨ¹ýÄãÇëÇóµÄÒ³ÃæÀàÐÍΪÆä¼ÓÔØÏàÓ¦µÄdllÎļþ£¬È»ºóÔÚ´¦Àí¹ý³ÌÖн«ÕâÌõÇëÇó·¢Ë͸øÄܹ»´¦ÀíÕâÌõÇëÇóµÄÄ£¿é,¶øÔÚASP.NETÖÐÕâ¸öÄ£¿é¾Í½Ð×öHttpHandler,ΪʲôaspxÕâÑùµÄÎļþ¿ÉÒÔ±»·þÎñÆ÷´¦Àí,ÄÇÊÇÒòΪÔÚ·þÎñÆ÷¶ËÓÐĬÈϵÄHttpHandlerרÃÅ´¦ÀíaspxÎļþ,IISÔÙ½«ÕâÌõÇëÇó·¢Ë͸øÄܹ»´¦ÀíÕâÌõÇëÇóµÄÄ£¿é֮ǰ,»¹ÐèÒª¾¹ýһЩHttpModule,ÕâЩ¶¼ÊÇϵͳĬÈϵÄModules,¶øÇÒÔÚÕâ¸öhttpÇëÇó´«µ½HttpHandler֮ǰҪ¾¹ý²»Í¬µÄHttpModulsµÄ´¦Àí,Õâ¾ÍÏñÎÒÃÇÈç¹ûÒª³Ë×ø¹ú¼Êº½°à·ÉµÖÒì¹úËûÏçµÄ»°,ÔÚÄãÕæÕý×øÉÏ·É»úǰ£¬Òª¾¹ý¹ºÂò»ú³¡½¨Éè·Ñ£¬°ìÀíµÇ¼ÇÊÖÐøºËʵÉí·Ý£¬½øÐÐÐÐÀî´ò°üÍÐÔË£¬½øÐа²È«¼ì²ì£¬ÏÖÔÚÓÖÒª½øÐÐÌåεȼì²ìÒ»Ñù£¬ÐèÒª¾Ò»ÏµÁеÄÑϸñµÄÊÖÐø¡£ÕâÑù×öÓÐʲôºÃ´¦£¬Ò»ÊÇΪһЩ±ØÐëµÄ¹ý³Ì£¬¶þÊÇΪÁ˰²È«ÐÔ£¬ÈýÊÇΪÁËÌá¸ßЧÂÊ£¬ËÄÊÇΪÁËÎÒÃÇÄܹ»ÔÚ¸ü¶àµÄ»·½ÚÉϽøÐпØÖÆ£¬¼´ÔöÇ¿ÁËÎÒÃǵĿØÖÆÄÜÁ¦¡£¶øÉÏÊöµÄ¶¼ÊÇϵͳµÄ£¬ÔõôÄÜ˵ÊÇÎÒÃǵĶÔhttpÇëÇó¿ØÖÆÄÜÁ¦ÄÜ£¬ÄÇôÎÒÃÇÊÇ·ñ¿ÉÒÔ½¨Á¢×Ô¼ºµÄHttpModuleºÍHttpHandlerÂ𣿴ð°¸Êǿ϶¨µÄ¡£µ«ÎÒÃÇÏȲ»Òª¼±ÓÚ×öÊ£¬ÈÃÎÒÃÇÔÙÉîÈëÑо¿Ò»ÏÂÔËÐлúÖÆ°É¡£
2.ASP.NETÔËÐлúÖÆ
¡¡
ÄÇôÉÏÃæÕâÕÅͼÈÃÎÒÃÇÄܹ»¸üÇå³þµØ¿´µ½Ò»¸öhttpÇëÇóÊÇÈçºÎ¾¹ý·þÎñÆ÷µÄ´¦ÀíµÄ£¬Í¬Ê±Í¨¹ýÕâÕÅͼÎÒÃÇÒ²¿ÉÒÔ¿´³öRequestÊÇÕÆ¹Ü×ÅËùÓпͻ§¶ËÊäÈëµÄ¡£Í¼ÖÐΪÎÒÃÇչʾÁËÒ»¸öhttpÇëÇóÓпÉÄܾ¹ýµÄËÄÌõ·Ïß¡£µ±ÄãµÚÒ»´Î·ÃÎÊÕâ¸öÒ³ÃæÊ±Õâ¸öÇëÇóÊ×ÏÈÒÀ´Î¾¹ýHttpModulsºÍHttpHandlerµÄ´¦Àí£¬¶øÔÚHttpHandlerµÄ´¦ÀíÖзþÎñÆ÷»áΪÄãתµ½ÄãÕæÕýÒª·ÃÎʵÄÒ³Ãæ£¬È»ºóͨ¹ýASP EngineÀ´ÕÒµ½Õâ¸öÒ³Ãæ±³ºóµÄÀ࣬²¢ÊµÀý»¯ÎªÒ»¸öÁÙʱ¶ÔÏó£¬Ôٴ˹ý³ÌÖлᴥ·¢Ò»ÏµÁеÄʼþ£¬ÆäÖÐÒ»²¿·ÝµÄʼþÐèÒª¾¹ý¶ÔÏóÖеķ½·¨´¦Àí£¬Ö®ºó·þÎñÆ÷»á½«Õâ¸ö´¦ÀíºóÒ³Ãæ·¢Òƽ»¸øResponse¶ÔÏó£¬È»ºóÓÉResponse¶ÔÏó½«Õâ¸öÒ³Ãæ·¢Ë͵½¿Í»§¶Ë¡£Õâ¾ÍÊǵÚÒ»Ìõ·Ïߣ¬¶øµ±ÄãÔÚÕâ¸öÒ³ÃæÉϽøÐÐÖØÐÂÌύһЩÐÅÏ¢£¬²¢¼ÌÐøÏò·þÎñÆ÷·¢ËÍÇëÇóʱ£¬ÒòΪÄãµÄ·þÎñÆ÷Ö®¼äµÄ»á»°ÒѾ½¨Á¢£¬¶ÔÓÚÄãËùÔÚµÄÄǸöÁÙʱ¶ÔÏóÔÚ·þÎñÆ÷ÖÐÒѾ½¨Á¢£¬ËùÒÔ²»ÓÃÔÙ¾¹ý³õʼ»¯Ò³ÃæµÄ¹¤×÷£¬¹ÊÕâµÚ¶þÌõ·ÏßÊǰ´ÕÕ HttpModuls£¬HttpHandler£¬È»ºóÖ±½ÓÓëÁÙʱ¶ÔÏó½»»¥£¬È»ºó·µ»ØµÄ¡£µÚÈýÌõ·ÏßÓëµÚ¶þÌõ²»Í¬µÄÊÇÔÚ´¦ÀíÇëÇóʱÈç¹ûÉæ¼°µ½ÐèÒªµ÷ÓÃASP Cache,¼ÈASP »º´æµÄ£¬¶øÁÙʱ¶ÔÏ󻨽«Ö±½Ó´ÓASP »º´æÌáÈ¡ÐÅÏ¢²¢·µ»Ø£®ÕâµÚËÄÌ
Ïà¹ØÎĵµ£º
ÔÚweb configÖÐ ×÷ÈçÏÂÅäÖãº
<connectionStrings>
<add name="ydycon" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=|DataDirectory|ydy.mdb" providerName="System.Data.OleDb"/>
</connectionStrings>
ÔÚ.netÎļþÖÐÓ¦ÓÃÁ´½Ó ......
ASP.NET ÅäÖýڼܹ¹°üº¬¿ØÖÆ ASP.NET Web Ó¦ÓóÌÐòÐÐΪµÄÔªËØ¡£Èç¹ûΪÊôÐÔÖ¸¶¨ÁËĬÈÏÖµ£¬Ôò¸ÃĬÈÏÖµÊÇÔÚ Machine.config ÎļþÖÐÉèÖõ쬏ÃÎļþµÄ·¾¶ÊÇ systemroot\Microsoft.NET\Framework\versionNumber\CONFIG\Machine.config¡£
<configuration>
<location>
......
ASP.NET·ÀÖ¹SQL×¢È뺯Êý:
using System;
using System.Text.RegularExpressions;
using System.Web;
namespace FSqlKeyWord
......{
/**//**//**//// <summary>
/// SqlKey µÄժҪ˵Ã÷¡£
/// </summary>
public class S ......
»¶Ó½øÈë.NETÉçÇøÂÛ̳£¬Óë200Íò¼¼ÊõÈËÔ±»¥¶¯½»Á÷ >>½øÈë
ASP.NET Êý¾Ý¿Ø¼þ:GridView,DataList,Repeater ,DetailsView,FormView¡£
ASP.NET Êý¾Ý¿Ø¼þ×ÛÊö£º
1.ǰ3¸öÓÃÓÚ³ÊÏÖ¶àÌõ¼Ç¼,ºóÃæ2¸öÓÃÓÚ³ÊÏÖµ¥ÌõÊý¾ÝÃ÷ϸ,¼´³£ÓõļǼÃ÷ϸ¡£
2.GridViewºÍDetailsView¿Ø¼þµÄ²¼¾Ö¹Ì¶¨,×Ô¶¨ÒåÊý¾ÝÏÔʾµÄ²¼¾Ö¹¦ÄÜÓÐÏÞ,Ò»°ã ......