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

ASP.netÒ³ÃæÌøת·½Ê½ÈýÖÖ

 
asp.netÔÚ¿ª·¢Ê±,ÔÚ²»Í¬µÄÒ³Ãæ¼äÌøתÊÇÎÒÃdz£Óöµ½µÄÒ»¼þÊÂ,µ±Ò»¸ö¸´ÔÓµÄÂß¼­ÔÚÒ»¸öÒ³Ãæ·Å²»Ï·ֳɶþ¸ö»ò¶à¸öÒ³Ãæ´¦Àí¾ÍÐèÒªÔÚÒ³Ãæ¼äÌøת,ÓõÄ×î¶à»¹ÊÇÓû§µÄµÇ½°É.
ASP.NETÓõÄ×î¶àµÄÌøתÊÇResponse.Redirect,Õâ¸öÃüÁî¿ÉÒÔÖ±½Ó°ÑÇëÇóÖض¨Ïòµ½Ò»¸öÏà¶Ô»ò¾ø¶ÔµÄ·¾¶.Ëü»á°Ñµ±Ç°Ò³ÃæµÄµÄHttpÁ÷×è¶ÏÖ±½ÓÖض¨Ïòµ½ÐµÄURL.
¶øServer.Transfer,Õâ¸öÃüÁîÊÇÓÉIIS·þÎñÆ÷Ö±½ÓÔÚ·þÎñÆ÷¶ËÖ´ÐÐÌøת,Õâ¸öÌøתµÄ·¾¶±ØÐëÊÇÏà¶Ô·¾¶,Ò²¾ÍÊÇͬһ¸öÍøÕ¾ÏÂÃæµÄPATH»òÐéÄâÄ¿ÑÛ¼.²»ÄÜÊÇÍâÍøµÄ¾ø¶Ô·¾¶,ÒòΪֱ½ÓÊÇÓɵ±Ç°ÇëÇóÒ³ÃæµÄͬһ¸öHTTP¾ä±úÖ¸¶¨ÇëÇóͬһվµãÉϵÄ·¾¶.
ËüÃǵÄÇø±ðÔÚÄÄ,ÏÈ¿´ÏÂHTTP Í·°É,ÏÈ¿´Response.Redirect
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Redirect("/redirect.aspx"); //Ö±½ÓÖض¨Ïòµ½±¾Õ¾µÄÆä·¾¶ÉÏ
        }
http://xml.test.com/HttpStatus.aspx -->Õâ¸öÊÇÖ¸ÎÒÇëÇóÖ´ÐеÄÒ³Ãæ
GET /HttpStatus.aspx HTTP/1.1
Host: xml.test.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: gb2312,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
HTTP/1.x 302 Found -->×¢ÒâÕâ¸ö302
Cache-Control: private
Content-Type: text/html; charset=utf-8
Location: /redirect.aspx
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Sun, 01 Nov 2009 12:12:45 GMT
Content-Length: 133
----------------------------------------------------------
http://xml.test.com/redirect.aspx-->  Õâ¸öÊÇÇëÇóÌøתµÄÒ³Ãæ
GET /redirect.aspx HTTP/1.1
Host: xml.test.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q


Ïà¹ØÎĵµ£º

ÎÞˢв¨ÐÎŤÇúasp.netÑéÖ¤Âë

 ÎÞˢУºÒ²¾ÍÊÇÒ»°ãÍøÕ¾¶¼Óеē¿´²»Ç壬µã»÷¸ü»»”¡¢“¸ü»»ÑéÖ¤Â딵ÄÄÇÖÖ¹¦ÄÜ£¬Ò»¶Îjs½Å±¾¸ã¶¨£¡
 ²¨ÐÎŤÇú£ºÀàËÆgoogleÑéÖ¤Â룬Õâ¸öÄܸüÓÐЧµÄ·ÀÖ¹ÑéÖ¤Âë±»»úÆ÷È˹¥ÆÆ£¬¾ßÌåµÄŤÇú³Ì¶È¿ÉÒÔ×ÔÐÐÉèÖã¨ÕýÏÒÇúÏßWaveŤÇúͼƬ²úÉú²¨ÐÎÂ˾µÐ§¹û£©£¬¼Ó¼Ó²ÎÊýÒ²¿ÉÒԸijÉmsnµÄÄÇÖÖ°¡£¬×Ô¼º¾ÙÒ»· ......

static±äÁ¿Óëasp.net

ÔÚC#ÖУ¬static±äÁ¿±íʾ¸Ã±äÁ¿ÊôÓÚÀ࣬¶ø²»ÊÇÀàµÄʵÀý¡£¿ÉÒÔ˵ÊǸÃÀàµÄËùÓÐʵÀý¹²ÏíÒ»¸östatic±äÁ¿¡£
asp.netµÄÒ³Ãæ¾ÍÊÇÒ»¸öÀ࣬ÎÒÃÇ·ÃÎÊÒ»¸öÒ³Ãæ¡£¾Í»áÔÚ·þÎñÆ÷ÉÏʵÀý»¯Ò»¸ö¸ÃÀàµÄʵÀý£¬À´ÏìÓ¦ÎÒÃǵÄÇëÇó¡£
“ËùÓÐʵÀý¹²ÏíÒ»¸östatic±äÁ¿” Õâ¾ÍÒâζ×Å£¬ËùÓеĿͻ§¶Ë·ÃÎʵ½µÄasp.netÒ³ÃæÖÐstatic±äÁ¿¶¼ÊÇͬһ¸ ......

Asp.Net MVCÖÐÉí·ÝÈÏÖ¤ºÍÊÚȨ

MVC×Ô´øµÄActionFilter
ÔÚAsp.Net WebFormµÄÖÐÒª×öµ½Éí·ÝÈÏ֤΢ÈíΪÎÒÃÇÌṩÁËÈýÖÖ·½Ê½£¬ÆäÖÐ×î³£ÓõľÍÊÇÎÒÃǵÄFormÈÏÖ¤£¬ÐèÒªÅäÖÃÏàÓ¦µÄÐÅÏ¢¡£ÀýÈçÏÂÃæµÄÅäÖÃÐÅÏ¢£º
<authentication mode="Forms">
<forms loginUrl="Login.aspx" defaultUrl="Default.aspx" protection="All" />
</authenticati ......

asp.net ÖÐµÄ URLÖØд

URL ÖØдÊǽØÈ¡´«Èë Web ÇëÇó²¢×Ô¶¯½«ÇëÇóÖض¨Ïòµ½ÆäËû URL µÄ¹ý³Ì¡£
   ±ÈÈçä¯ÀÀÆ÷·¢À´ÇëÇóhostname/101.aspx £¬·þÎñÆ÷×Ô¶¯½«Õâ¸öÇëÇóÖж¨ÏòΪhttp://hostname/list.aspx?id=101¡£
urlÖØдµÄÓŵãÔÚÓÚ£º
     Ëõ¶Ìurl£¬Òþ²Øʵ¼Ê·¾¶Ìá¸ß°²È«ÐÔ
     Ò×ÓÚÓû§¼ÇÒäºÍ¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ