ASP.netÖеÄAJAXѧϰ¼Ç¼
½ñÌìÎÒÖ÷ҪѧϰÁËUpdateModeÊôÐÔ¼°Ê¹ÓÃUpdateTriggers£¬°ÑÊéÖÐËù½ÌÊÚµÄÄÚÈÝÓöà¸öÀý×Óʵ¼ùÁËһϣ¬È·ÊµÃ÷°×ÁËÐí¶à¡£
UpdateMode
Ê×ÏÈÔÚÉÏһƪҲÌáµ½¹ýÕâÑùÒ»¸öÀíÂÛ£ºÔÚ̸ÂÛUpdatePanel¿Ø¼þµÄË¢ÐÂʱ£¬µ±UpdatePanel¿Ø¼þÖеÄ×ӿؼþ´¥·¢Async-Postback¶¯×÷ʱ£¬Ë¢ÐµÄÇøÓòÊÇ“º¸ÇÍøÒ³ÉϵÄËùÒÔ½«UpdateMode£¨vsÌáʾµÄÊôÐÔÃèÊöÊÇ“Ö¸Ã÷updatepanelÊǽ«ÔÚÿ´ÎÒ첽ͬ·¢ÊÇˢл¹ÊÇÖ»ÔÚ·¢ÉúÌض¨²Ù×÷ʱˢД£©ÉèΪAlwaysµÄUpdatePanel¿Ø¼þ”£¬¶ø²»Êǵ¥µ¥Ö»Óд¥·¢Async-PostbackµÄÄǸöUpdatePanel¿Ø¼þ¡£ÓÃÎҵĻ°Ëµ£¬¾ÍÊÇÒ»¸öÒ³ÃæÉÏÓпÉÄÜÓжà¸öupdatepanel¿Ø¼þ£¬¶øÿ¸öupdatepanel¿Ø¼þÓÐÒ»¸ö¹²Í¬µÄÊôÐÔÊÇUpdateMode£¬updateModeÊôÐÔÓÖÓÐÁ½¸öÖµ£ºÒ»¸öÊÇAlways£¬Ò»¸öÊÇConditional¡£µ±Ò³ÃæÿˢÐÂÒ»´Î£¬ÕâÑùÒ³ÃæÖеÄËùÓн«updateModeÊôÐÔÉèΪAlwaysµÄupdatepanelÒ²»á¸ú×ÅˢУ¬¶øÕâ¸öÒ³ÃæÖÐÄÇЩ½«updateModeÊôÐÔÉèΪConditionalµÄupdatepanel»á¸ù¾ÝÌض¨µÄ²Ù×÷Ìõ¼þÀ´Ë¢Ð£¬ÄÇôÕâ¸öÌض¨Ìõ¼þÊÇÓÃʲôÀ´ÉèÖõÄÄØ£¿´ð°¸Êǽ»ÓÉTriggers£¨vsÌáʾµÄÊôÐÔÃèÊöÊÇ“¿ÉÒÔµ¼ÖÂupdatepanel¸üеĴ¥·¢Æ÷µÄ¼¯ºÏ£©»ò³ÌÐòÀ´¿ØÖƸÃupdatepanel¿Ø¼þµÄˢС£
UpdateTriggers
µ±Ò»¸öupdatepanelµÄË¢ÐÂÊǸù¾ÝÒ»¶¨µÄÌõ¼þʱ£¬ÉèÖÃupdateTriggersÊôÐÔ¾ÍÏԵúÜÖØÒª£¬Ö»ÓÐupdateTriggersÖÐÉ趨µÄ¿Ø¼þ·¢ÉúAsync-Postback¶¯×÷ʱ£¬Õâ¸öupdatepanel¿Ø¼þ²Å»áˢС£Ä¬ÈÏÇé¿öÏ£¬updatepanel¿Ø¼þµÄChildrenAsTriggersÊôÐÔÖµÉèΪtrue£¬Òâζ×ÅλÓÚ´Ëupdatepanel¿Ø¼þÖеÄ×ӿؼþ»á×Ô¶¯³ÉΪupdateTriggersµÄÒ»²¿·Ö£¬Ò²¾ÍÊÇ˵ֻҪÕâЩ×ӿؼþ·¢ÉúPostback¶¯×÷£¬Õâ¸öPostback¶¯×÷¾Í½«±ä³ÉAsync-Postback¶¯×÷£¬Íê³Éºó¾Í»áˢдËupdatepanelÖеÄÄÚÈÝ¡£Êʵ±µØÀûÓÃupdateMode¼°updateTriggers£¬¿ÉÒÔ¶Ôupdatepanel¿Ø¼þµÄË¢ÐÂ×ö¸üϸÖµĵ÷ÕûºÍ¸üÓÐЧÂʵÄÓ¦Óá£ÉÏÃæÕâ¶Î»°ÊÇÎÒѧϰµÄÄDZ¾ÊéÉϵÄÔ»°£¬ÓÃÎÒµÄÀí½â˵ÄØ£¬¾ÍÊÇÒ»¸öupdatepanel×ÔÉíµÄËùÓÐ×ӿؼþ¶¼ÊÇTriggers¼¯ºÏµ±ÖеÄÒ»Ô±£¬³ýÁË×ÔÉíµÄÍ⣬Triggers¼¯ºÏ»¹¿ÉÒÔÌí¼ÓÆäËû·Ç´ËupdatepanelµÄ¿Ø¼þ£¬Ö»Òªupdatepanel1µÄTriggers¼¯ºÏÖÐÓеĿؼþÈ磺Button1·¢ÉúÁ˼ÓÈëµ½Triggers¼¯ºÏÖеÄButton1µÄClickʼþʱ£¬¾Í»á´ø¶¯updatepanel1ÖÐËùÓÐÄÚÈݵĸüУ¬µ±È»ÒòΪupdatepanel1ÖеÄ×ӿؼþÒ²ÊÇTriggers¼¯ºÏÖеÄÒ»Ô±£¬Ö»ÊDz»±ØÏÂÈçÏÂͼ1ÖÐÊÖ¶¯µÄÌí¼Óµ
Ïà¹ØÎĵµ£º
ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔÇ°µÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕ߶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......
´Ë´¦ÌṩµÄ´úÂëÓÃÀ´ÊµÏÖµ±asp.netÒ³ÃæÖеÄij¸öButton±»µã»÷ºódisableµô¸ÃÒ³ÃæÖÐËùÓеÄButton£¬´Ó¶ø·ÀÖ¹Ìá½»ÑÓʱµ¼ÖµĶà´ÎÌá½»¡£»ùÓÚ֮ǰµÄonceclickbutton½Å±¾.
//ASP.NETÖзÀÖ¹Ò³Ãæ¶à´ÎÌá½»µÄ´úÂë:javascript< script language="javascript"> < !-- function disableOtherSubmit() {
var obj = event.s ......
ÔÚASP.NETÍøÕ¾ÖÐÍøÕ¾¹ÜÀíºǫ́ÐèÒª¾³£ÑéÖ¤Óû§Éí·Ý,ҪʵÏÖÕâÖÖ¹¦ÄܾͿÉÒÔÀûÓÃÄǸö¼Ì³Ð»úÖƺÍASP.NETµÄʼþ»úÖÆ.Ê×Ïȶ¨ÒåÒ»¸öÐèÒª½øÐÐÉí·ÝÑéÖ¤µÄBasePageÀà,¼Ì³Ð×ÔPageÀà,ÔÚBasePageÀàµÄ¹¹Ô캯ÊýÖж¨ÒåËüµÄ¼ÓÔØʼþµÄ´¦Àí´úÂë,ÕâÑùËùÓм̳Ð×ÔBasePageÀàµÄÒ³Ã涼ÄÜ×Ô¶¯Ö´ÐÐÉí·ÝÑéÖ¤£º
/// <summary>
/// ÑéÖ ......
ĬÈÏÇé¿öÏ£¬ÄäÃûÓû§²»ÄÜÐÞ¸ÄprofileÊôÐÔ£¬ÎÊÌâÔÚÓÚASP.NET FrameworûÓа취¹ØÁªProfileÊý¾ÝºÍÌض¨µÄÓû§£¬³ý·ÇÓû§ÊǾ¹ýÉí·ÝÑéÖ¤µÄ¡£
Èç¹ûÏ£ÍûÄäÃûÓû§ÐÞ¸ÄprofileµÄÊôÐÔ£¬±ØÐëÆôÓÃASP.NET FrameworkµÄÄäÃûÈÏÖ¤£¨Anonymous Identification£©µÄ¹¦ÄÜ¡£µ±¿ªÆôÕâ¸ö¹¦ÄÜʱ£¬Ò»¸ö±êʶ£¨Ò»¸öGUID£©±»·ÖÅä¸øÄäÃûÓû§£¬²¢ ......
What is ASP.NET
ASP.NET is a unified Web development model that includes the services necessary for you to build enterprise-class Web applications with a minimum of coding. ASP.NET is part of the .NET Framework, and when coding ASP.NET applications you have access to classes in the .NET Frame ......