ASP.NET
ÊÓͼ״̬ÊÇ ASP.NET Ò³¿ò¼ÜÓÃÓÚÔÚÍù·µ¹ý³ÌÖ®¼ä±£ÁôÒ³ºÍ¿Ø¼þÖµµÄ·½·¨¡£ÔÚ³ÊÏÖÒ³µÄ HTML ±ê¼Çʱ£¬±ØÐëÔڻط¢¹ý³ÌÖб£ÁôµÄÒ³ºÍÖµµÄµ±Ç°×´Ì¬½«±»ÐòÁл¯Îª Base64 ±àÂë×Ö·û´®¡£È»ºó£¬´ËÐÅÏ¢½«±»·ÅÈëÒ»¸ö»ò¶à¸öÊÓͼ״̬Òþ²Ø×ֶΡ£
1¡¢·½°¸
ÊÓͼ״̬ÓÉ ASP.NET Ò³¿ò¼Ü×Ô¶¯ÓÃÓÚ±£´æÔÚ¸÷¸ö»Ø·¢Ö®¼ä±ØÐë±£ÁôµÄÐÅÏ¢¡£´ËÐÅÏ¢°üÀ¨¿Ø¼þµÄÈκηÇĬÈÏÖµ¡£
Äú»¹¿ÉÒÔʹÓÃÊÓͼ״̬À´´æ´¢Ìض¨ÓÚÒ³µÄÓ¦ÓóÌÐòÊý¾Ý¡£
2¡¢¹¦ÄÜ
ÊÓͼ״̬ÊÇ ASP.NET Ò³ÖеĴ洢¿â£¬¿ÉÒÔ´æ´¢±ØÐëÔڻط¢¹ý³ÌÖб£ÁôµÄÖµ¡£Ò³¿ò¼ÜʹÓÃÊÓͼ״̬ÔÚ¸÷¸ö»Ø·¢Ö®¼ä±£´æ¿Ø¼þÉèÖá£
¿ÉÒÔÔÚÄú×Ô¼ºµÄÓ¦ÓóÌÐòÖÐʹÓÃÊÓͼ״̬Íê³ÉÒÔϹ¤×÷£º
·ÔÚ¸÷¸ö»Ø·¢Ö®¼ä±£´æÖµ£¬¶ø²»½«ÕâЩֵ´æ´¢ÔڻỰ״̬»òÓû§ÅäÖÃÎļþÖС£
·´æ´¢Äú¶¨ÒåµÄÒ³»ò¿Ø¼þÊôÐÔµÄÖµ¡£
·´´½¨Ò»¸ö×Ô¶¨ÒåÊÓͼ״̬Ìṩ³ÌÐò£¬ÒԱ㽫ÊÓͼ״̬ÐÅÏ¢´æ´¢ÔÚ SQL Server Êý¾Ý¿â»òÆäËûÊý¾Ý´æ´¢ÇøÖС£
ÀýÈ磬Äú¿ÉÒÔ½«ÐÅÏ¢´æ´¢ÔÚÊÓͼ״̬ÖУ¬ÕâÑùÔÚÏ´ν«¸ÃÒ³·¢Ë͵½·þÎñÆ÷ʱ£¬´úÂë±ã¿ÉÒÔÔÚÒ³¼ÓÔØʼþ¹ý³ÌÖзÃÎÊÕâЩÐÅÏ¢¡£
3¡¢±³¾°
Web Ó¦ÓóÌÐòÊÇÎÞ״̬µÄ¡£Ã¿´Î´Ó·þÎñÆ÷ÇëÇóҳʱ£¬¶¼»á´´½¨ÍøÒ³ÀàµÄÒ»¸öÐÂʵÀý¡£Õâͨ³£Òâζ×ÅÔÚÿ´ÎÍù·µ¹ý³ÌÖлᶪʧ¸ÃÒ³¼°Æä¿Ø¼þÖеÄËùÓÐÐÅÏ¢¡£ÀýÈ磬ĬÈÏ״̬Ï£¬Èç¹ûÓû§½«ÐÅÏ¢ÊäÈëµ½ HTML ÍøÒ³ÉϵÄÎı¾¿òÖУ¬¸ÃÐÅÏ¢»á·¢Ë͵½·þÎñÆ÷¡£µ«ÊÇ£¬¸ÃÐÅÏ¢²»»áÔÚÏìÓ¦Öзµ»Øµ½ä¯ÀÀÆ÷¡£
ΪÁË¿Ë·þ Web ±à³ÌµÄÕâÒ»¹ÌÓеľÖÏÞÐÔ£¬ASP.NET Ò³¿ò¼Ü°üº¬¼¸ÖÖ״̬¹ÜÀí¹¦ÄÜ£¬¿ÉÒÔÔÚÍù·µ¹ý³ÌÖ®¼ä½«Ò³ºÍ¿Ø¼þÖµ±£´æµ½ Web ·þÎñÆ÷¡£ÆäÖÐÒ»ÖÖ¹¦ÄܱãÊÇÊÓͼ״̬¡£
ĬÈÏÇé¿öÏ£¬ASP.NET Ò³¿ò¼ÜʹÓÃÊÓͼ״̬ÔÚÍù·µ¹ý³ÌÖ®¼ä±£´æÒ³ºÍ¿Ø¼þÖµ¡£ÔÚ³ÊÏÖÒ³µÄ HTML ʱ£¬±ØÐëÔڻط¢¹ý³ÌÖб£ÁôµÄÒ³ºÍÖµµÄµ±Ç°×´Ì¬½«±»ÐòÁл¯Îª Base64 ±àÂë×Ö·û´®¡£È»ºó£¬ËüÃǽ«±»·ÅÈëÒ³ÖеÄÒ»¸ö»ò¶à¸öÒþ²Ø×ֶΡ£
Äú¿ÉÒÔÔÚ´úÂëÖÐʹÓÃÒ³µÄ ViewState ÊôÐÔ·ÃÎÊÊÓͼ״̬¡£ViewState ÊôÐÔÊÇÒ»¸ö°üº¬¼ü/Öµ¶Ô£¨ÆäÖаüº¬ÊÓͼ״̬Êý¾Ý£©µÄ×ֵ䡣
°²È«ËµÃ÷£º ¶ñÒâÓû§¿ÉÒÔºÜÈÝÒ׵ز鿴ºÍÐÞ¸ÄÒþ²ØÓòµÄÄÚÈÝ¡£
ͨ¹ýʵÏÖ×Ô¶¨ÒåµÄ PageStatePersister ÀàÒÔ´æ´¢Ò³Êý¾Ý£¬Äú¿ÉÒÔ¸ü¸ÄĬÈÏÐÐΪ²¢½«ÊÓͼ״̬´æ´¢µ½ÁíÒ»¸öλÖã¨Èç SQL Server Êý¾Ý¿â£©¡£
4¡¢Ê¹ÓÃÊÓͼ״̬µÄ×¢ÒâÊÂÏî
ÊÓͼ״̬ÌṩÁËÌض¨ ASP.NET Ò³µÄ״̬ÐÅÏ¢¡£Èç¹ûÐ
Ïà¹ØÎĵµ£º
£¨Ò»£© ģ̬´°ÌåµÄ´¦Àí·½·¨
1 javascript Óï·¨£º
var returnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])
·Çģ̬´°Ì壺
vReturnValue = window.showModelessDialog(sURL [, vArguments] [,sFeatures])
²ÎÊý˵Ã÷£º
sURL£º±ØÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´®¡£ÓÃÀ´Ö¸¶¨¶Ô»°¿òÒªÏÔʾµÄÎĵµµÄURL¡£
vAr ......
ASP.NET defines an application as the sum of all files, pages, handlers, modules, and executable code that can be invoked or run in the scope of a given virtual directory (and its subdirectories) on a Web application server. For example, an "order" application might be published in the "/order ......
//ÔÚµ±Ç°Ò³ÖйرÕ
Response.Write("<Script>window.opener.opener= null;window.opener.location.replace(window.opener.location.href='ideabank.aspx');window.close();</Script>");
//¸¸ÀàÒ³´ò¿ª ×ÓÒ³
Response.Write("<script>window.open('upideabank.aspx?id="+id+"','','height=50 ......
ͨ³£²¿ÊôÍøÕ¾µÄʱºòÐèÒª±àÒëÄÇЩÐèÒªµÄÎļþ£¬ºÍһЩϵͳÐèÒªµÄ×é¼þ¡£
»á¸Ð¾õµ½ºÜ·±Ëö¡£
·¢²¼ÍøÕ¾ÊÇÒ»¸ö²»´íµÄÑ¡Ôñ:Ö±½Ó·¢²¼·þÎñÆ÷ÉÏ£¬ÉèÖúÃÕ¾µãÓë¶Ë¿Ú¼´¿É¡£ÒÔÏÂÊÇ×ܽáµÄ²½Öè¡£¡£¡£
µÚÒ»¡¢Êǽ«ÍøÕ¾ÀïËùÓеÄÊý¾ÝÁ¬½Ó¶¼×ö³É´Óweb.configÖжÁÈ¡£¬ÕâÑùµÄ»°£¬¾Í¿ÉÒÔÒ»ÀÍÓÀÒÝÁË¡£
µÚ¶þ¡¢¾ÍÊÇIISÉèÖÃÁË£¬ÔÚIISÖеÄasp.netÖÐ ......
»ñÈ¡Óйط¢³öÒ³ÇëÇóµÄÓû§µÄÐÅÏ¢¡£
Ò»¡¢HttpContext Àà
·â×°Óйظö±ð HTTP ÇëÇóµÄËùÓÐ HTTP Ìض¨µÄÐÅÏ¢¡£
HttpContext ÀàÐ͹«¿ªÒÔϳÉÔ±¡£
¹¹Ô캯Êý
Ãû³Æ
˵Ã÷
HttpContext
ÒÑÖØÔØ¡£ ³õʼ»¯ LinePragmaCodeInfo ÀàµÄÒ»¸öÐÂʵÀý¡£
·½·¨
Ãû³Æ
˵Ã÷
AddError
½«Òì³£Ìí¼Óµ½µ±Ç° HTTP ÇëÇóµÄÒ ......