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

ASP.NET


      Ó¦ÓóÌÐò״̬Êǿɹ© ASP.NET Ó¦ÓóÌÐòÖеÄËùÓÐÀàʹÓõÄÊý¾Ý´¢´æ¿â¡£Ëü´æ´¢ÔÚ·þÎñÆ÷µÄÄÚ´æÖУ¬Òò´ËÓëÔÚÊý¾Ý¿âÖд洢ºÍ¼ìË÷ÐÅÏ¢Ïà±È£¬ËüµÄÖ´ÐÐËٶȸü¿ì¡£ÓëÌض¨ÓÚµ¥¸öÓû§»á»°µÄ»á»°×´Ì¬²»Í¬£¬Ó¦ÓóÌÐò״̬ӦÓÃÓÚËùÓеÄÓû§ºÍ»á»°¡£Òò´Ë£¬Ó¦ÓóÌÐò״̬ÓÃÓÚ´æ´¢ÄÇЩÊýÁ¿½ÏÉÙ¡¢²»ËæÓû§µÄ±ä»¯¶ø±ä»¯µÄ³£ÓÃÊý¾Ý¡£
 
1¡¢Ê¹ÓÃÓ¦ÓóÌÐò״̬
Ó¦ÓóÌÐò״̬´æ´¢ÔÚ HttpApplicationState ÀàµÄʵÀýÖС£´ËÀ๫¿ª¶ÔÏóµÄ¼üÖµ×ֵ䡣
ÔÚÓû§³õ´Î·ÃÎÊÓ¦ÓóÌÐòÖеÄÈκΠURL ×ÊԴʱ£¬½«»á´´½¨ HttpApplicationState ʵÀý¡£HttpApplicationState Ààͨ³£Í¨¹ý HttpContext ÀàµÄ Application ÊôÐÔ·ÃÎÊ¡£
¿ÉÒÔͨ¹ýÁ½ÖÖ·½Ê½Ê¹ÓÃÓ¦ÓóÌÐò״̬¡£¿ÉÒÔͨ¹ý´úÂëÖ±½Ó¶Ô Contents ¼¯ºÏÖеÄÖµ½øÐÐÌí¼Ó¡¢·ÃÎÊ»òÒƳý²Ù×÷¡£ÔÚÓ¦ÓóÌÐòÔËÐÐʱ£¬¿ÉÒÔËæʱ·ÃÎÊ HttpApplicationState Àà¡£µ«¸ÃÀàͨ³£ÓÃÓÚÔÚÓ¦ÓóÌÐòÆô¶¯Ê±¼ÓÔØÓ¦ÓóÌÐò״̬Êý¾Ý¡£Îª´Ë£¬¿ÉÏò Global.asax ÎļþÖÐµÄ Application_Start ·½·¨ÖÐÌí¼Ó¼ÓÔØÓ¦ÓóÌÐò״̬µÄ´úÂë¡£
´ËÍ⣬»¹¿ÉÒÔÔÚ Web Ó¦ÓóÌÐòµÄ Global.asax ÎļþÖÐͨ¹ý <object runat="server"> ÉùÃ÷Ïò StaticObjects ¼¯ºÏÌí¼Ó¶ÔÏó¡£Ëæºó£¬¾Í¿ÉÒÔÔÚÓ¦ÓóÌÐòÖеÄÈκεط½Í¨¹ý´úÂë¶ÔÓÃÕâÖÖ·½·¨¶¨ÒåµÄÓ¦ÓóÌÐò״̬½øÐзÃÎÊ¡£ÏÂÃæµÄʾÀýÑÝʾÁËÓ¦ÓóÌÐò״ֵ̬µÄ¶ÔÏóÉùÃ÷£º
<object runat="server" scope="application" ID="MyInfo"
    PROGID="MSWC.MYINFO">
</object>
      Ö»ÄÜÔÚ Global.asax ÎļþÖÐÏò StaticObjects ¼¯ºÏÌí¼Ó¶ÔÏó¡£Èç¹ûÊÔͼֱ½Óͨ¹ý´úÂëÌí¼Ó¶ÔÏ󣬸ü¯ºÏ½«Òý·¢ NotSupportedException¡£
²»±ØÒýÓà Application ¼¯ºÏ£¬¾Í¿ÉÒÔ·ÃÎÊÓ¦ÓóÌÐò״̬Öд洢µÄ¶ÔÏó³ÉÔ±¡£ÏÂÃæµÄ´úÂëʾÀýÑÝʾÁËÈçºÎÒýÓÃÔÚÓ¦ÓóÌÐò״̬µÄ StaticObjects ¼¯ºÏÖж¨ÒåµÄ¶ÔÏó³ÉÔ±£º
protected void Page_Load(Object sender, EventArgs e)
    Label1.Text = MyInfo.Title;
End Sub
 
2¡¢Ó¦ÓóÌÐò״̬עÒâÊÂÏî
ʹÓÃÓ¦ÓóÌÐò״̬ʱ£¬±ØÐë×¢ÒâÒÔÏÂÖØÒªÊÂÏ
·×ÊÔ´   ÓÉÓÚÓ¦ÓóÌÐò״̬´æ´¢ÔÚÄÚ´æÖУ¬Òò´Ë±È½«Êý¾Ý±£´æµ½´ÅÅÌ»òÊý¾Ý¿âÖÐËٶȸü¿ì¡£µ«ÊÇ£¬ÔÚÓ¦ÓóÌÐò״̬Öд洢½Ï´óµÄÊý¾Ý¿é¿ÉÄÜ»áºÄ¾¡·þÎñÆ÷Äڴ棬Õâ»áµ¼Ö·þÎñÆ÷½«ÄÚ´æ·ÖÒ³µ½´ÅÅÌ¡£³ýÁËʹÓÃÓ¦ÓóÌÐò״̬֮Í⣬»¹¿ÉÒÔʹÓà ASP.NET »º´æ»úÖÆÀ´´æ´¢´óÁ¿µÄÓ¦ÓóÌÐòÊý¾


Ïà¹ØÎĵµ£º

ASP.NET µÄģ̬´°ÌåµÄ´¦Àí

£¨Ò»£© ģ̬´°ÌåµÄ´¦Àí·½·¨
1  javascript Óï·¨£º
var returnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])
·Çģ̬´°Ì壺
vReturnValue = window.showModelessDialog(sURL [, vArguments] [,sFeatures])
²ÎÊý˵Ã÷£º
sURL£º±ØÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´®¡£ÓÃÀ´Ö¸¶¨¶Ô»°¿òÒªÏÔʾµÄÎĵµµÄURL¡£
vAr ......

asp.net·¢²¼ÍøÕ¾


ͨ³£²¿ÊôÍøÕ¾µÄʱºòÐèÒª±àÒëÄÇЩÐèÒªµÄÎļþ£¬ºÍһЩϵͳÐèÒªµÄ×é¼þ¡£
»á¸Ð¾õµ½ºÜ·±Ëö¡£
·¢²¼ÍøÕ¾ÊÇÒ»¸ö²»´íµÄÑ¡Ôñ:Ö±½Ó·¢²¼·þÎñÆ÷ÉÏ£¬ÉèÖúÃÕ¾µãÓë¶Ë¿Ú¼´¿É¡£ÒÔÏÂÊÇ×ܽáµÄ²½Öè¡£¡£¡£
µÚÒ»¡¢Êǽ«ÍøÕ¾ÀïËùÓеÄÊý¾ÝÁ¬½Ó¶¼×ö³É´Óweb.configÖжÁÈ¡£¬ÕâÑùµÄ»°£¬¾Í¿ÉÒÔÒ»ÀÍÓÀÒÝÁË¡£
µÚ¶þ¡¢¾ÍÊÇIISÉèÖÃÁË£¬ÔÚIISÖеÄasp.netÖÐ ......

ÈçºÎ°²×°Ó벿Êðasp.netÍøÕ¾

 ÈçºÎ¸øAsp.Net ÍøÕ¾ÏîÄ¿´ò°ü
1¡¢´ò¿ªÄãµÄÏîÄ¿£¬ÔÚ<½â¾ö·½°¸¹ÜÀíÆ÷>ÖÐÓÃÊó±êÓÒ»÷ÄãµÄ<½â¾ö·½°¸>£¬Ñ¡Ôñ<Ìí¼Ó>-<н¨ÏîÄ¿>¡£
2¡¢<Ìí¼ÓÐÂÏîÄ¿>¶Ô»°¿òÖÐÑ¡Ôñ<°²×°ºÍ²¿ÊðÏîÄ¿>-<web°²×°ÏîÄ¿>¡££¨×¢Ò⣺<web°²×°ÏîÄ¿>µÄ´æ·Å·¾¶¡££©
3¡¢vs.net µÄ´°¿Ú×ó²à»áÏÔʾ<Îļþ ......

ASP.NETÒ³Ãæ¶ÔÏó – User

 »ñÈ¡Óйط¢³öÒ³ÇëÇóµÄÓû§µÄÐÅÏ¢¡£
Ò»¡¢HttpContext Àà
·â×°Óйظö±ð HTTP ÇëÇóµÄËùÓÐ HTTP Ìض¨µÄÐÅÏ¢¡£
HttpContext ÀàÐ͹«¿ªÒÔϳÉÔ±¡£
 ¹¹Ô캯Êý
Ãû³Æ
˵Ã÷
HttpContext
ÒÑÖØÔØ¡£ ³õʼ»¯ LinePragmaCodeInfo ÀàµÄÒ»¸öÐÂʵÀý¡£
 ·½·¨
Ãû³Æ
˵Ã÷
AddError
½«Òì³£Ìí¼Óµ½µ±Ç° HTTP ÇëÇóµÄÒ ......

ASP.NET


      ״̬¹ÜÀíÊÇÄú¶Ôͬһҳ»ò²»Í¬Ò³µÄ¶à¸öÇëÇóά»¤×´Ì¬ºÍÒ³ÐÅÏ¢µÄ¹ý³Ì¡£ÓëËùÓлùÓÚ HTTP µÄ¼¼ÊõÒ»Ñù£¬Web ´°ÌåÒ³ÊÇÎÞ״̬µÄ£¬ÕâÒâζ×ÅËüÃDz»×Ô¶¯Ö¸Ê¾ÐòÁÐÖеÄÇëÇóÊÇ·ñÈ«²¿À´×ÔÏàͬµÄ¿Í»§¶Ë£¬»òÕßµ¥¸öä¯ÀÀÆ÷ʵÀýÊÇ·ñÒ»Ö±Ôڲ鿴ҳ»òÕ¾µã¡£´ËÍ⣬µ½·þÎñÆ÷µÄÿһÍù·µ¹ý³Ì¶¼½«Ïú»Ù²¢ÖØд´½¨Ò³£»Òò´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ