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

ASP.NETÒ³Ã澲̬»¯Ö®URLÖØд (ת)

ÓйØÓÚURLµÄÖØд£¬±¾ÎÄÒ²Ö»ÊÇÄÃÀ´Ö÷Òâ¡£Ïà¼ÌÓÐMSµÄ×é¼þ“URLRewriter”ºÍÔÚGlobal.asaxÀïµÄ“Application_BeginRequest()”±àÂ뷽ʽ£¬ÒÔ¼°IISÀïµÄISAPIÉèÖá£
ÄÈÁÐÏÂÀ´£¬ÊµÏÖ·½·¨Ò²¶¼ºÜ¼òµ¥¡£
·½·¨Ò»£ºMS×é¼þ
ÕâÀïÒ²²»ÓÃÏê½âÁË£¬Ïà¹ØÇë¿´£º
http://www.microsoft.com/china/msdn/library/webservices/asp.net/URLRewriting.mspx
Ó÷¨ºÜ¼òµ¥£¬Ö»ÐèÒª°Ñ×é¼þURLRewriter.dll¿½µ½Ó¦ÓóÌÐòµÄbinĿ¼Ï£¬È»ºóÔÚweb.configϼÓÈëÈçÏ´úÂ룺
ÔÚ<configuration></configuration>ÖмÓÈ룺
     <configSections>
          <sectionname="RewriterConfig"type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
     </configSections>
    
     <RewriterConfig>
          <Rules>
              <RewriterRule>
                   <LookFor>~/("d{4})/("d{2})/Default".aspx</LookFor>
                   <SendTo>~/Default.aspx?ID=$1</SendTo>
              </RewriterRule>
          </Rules>
     </RewriterConfig>
È»ºóÔÚ<system.web></system.web>ÖмÓÈ룺
<httpHandlers>
   <addverb="*"path="*.aspx"
        type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
</httpHandlers>
×îºóÔÚµØÖ·À¸ÉϼüÈ룺http://localhost/Test/2004/12/News.aspx
Ч¹û³öÀ´ÁË¡£
ÉÏÃæµÄ<LookFor>~/("d{4})/("d{2})/News".aspx</LookFor>Õâ¾äÕâÕýÔò±í´ïʽURL£¬¼´±»ÖØдµÄURL£¬¶ø<SendTo>~/Default.aspx?ID=$1</SendTo>ÕâÒ»¾ä


Ïà¹ØÎĵµ£º

ASP.NET¹ØÓÚÌõÐÎÂëµÄÉú³ÉÎÊÌâ¼æÍøÒ³´òÓ¡

ÌõÐÎÂëÊÇÆù½ñΪֹ×î¾­¼Ã¡¢ÊµÓõÄÒ»ÖÖ×Ô¶¯Ê¶±ð¼¼Êõ¡£ÌõÐÎÂë¼¼Êõ¾ßÓÐÒÔϼ¸¸ö·½ÃæµÄÓŵã
¡¡¡¡A£®ÊäÈëËٶȿ죺Óë¼üÅÌÊäÈëÏà±È£¬ÌõÐÎÂëÊäÈëµÄËÙ¶ÈÊǼüÅÌÊäÈëµÄ5±¶£¬²¢ÇÒÄÜʵÏÖ“¼´Ê±Êý¾ÝÊäÈ딡£
¡¡¡¡B£®¿É¿¿ÐԸߣº¼üÅÌÊäÈëÊý¾Ý³ö´íÂÊΪÈý°Ù·ÖÖ®Ò»£¬ÀûÓùâѧ×Ö·ûʶ±ð¼¼Êõ³ö´íÂÊΪÍò·ÖÖ®Ò»£¬¶ø²ÉÓÃÌõÐÎÂë¼¼ÊõÎóÂëÂʵ ......

asp,asp.net,php,jspϵÄ301תÏò´úÂë,ÕûÕ¾Öض¨Ïò

 asp,asp.net,php,jspϵÄ301תÏò´úÂë
ʹÓÃ.htaccessÎļþÀ´½øÐÐ301Öض¨Ïò¡£
Èç¹û¿Õ¼ä²»Ö§³Ö.htaccessÎļþ£¬ÄÇôÎÒÃÇ»¹¿ÉÒÔͨ¹ýphp/asp´úÂëÀ´½øÐÐ301Öض¨Ïò¡£
ΪÁ˽«ËÑË÷ÒýÇæµÄ¼Ç¼¸üе½ÏÖÔÚµÄÓòÃûÉÏÃæ,×öÁ˼¸¸ö301Öض¨ÏòµÄ¶«¶«,¸ø´ó¼Ò·ÖÏíÒ»ÏÂ.
asp 301תÏò´úÂë
ÔÚ index.asp »ò default.asp µÄ×²¿¼ÓÈëÒÔ ......

Àí½âASP.NET 2.0Öеĵ¥µãµÇ¼

 ÕªÒª
ÔÚÕâƪÎÄÕÂÖУ¬MasoudÌÖÂÛÁËÓ¦ÓÃASP.NETÖÐͳһÉí·ÝÑé֤ģÐͽøÐпçÓ¦ÓóÌÐòÑéÖ¤µÄÎÊÌ⣬°üÀ¨£ºMembership Providers, web.configÅäÖÃ,ÅäÖÃÎļþµÄ¼ÓÃܽâÃܵȡ£ÔÚÎÄÕµÄ×îºó£¬×÷ÕßÌṩÁËͨ¹ýASP.NET login controlsÀ´ÑéÖ¤µÄ³ÌÐò¡£
by Masoud Tabatabaei:
Ŀ¼
¼ò½é
ʲôÊÇSSO£¿ËüÊÇÔõÑù¹¤×÷µÄ£¿
ϵͳÌõ¼þ ......

asp.netÃæÊÔÌâ(5)

61.²úÉúÒ»¸öintÊý×飬³¤¶ÈΪ100£¬²¢ÏòÆäÖÐËæ»ú²åÈë1-100£¬²¢ÇÒ²»ÄÜÖظ´¡£   
 
int[] intarr=new int[100];   
 
arraylist mylist=new arraylist();   
 
random rnd=new random();   
 
while(mylist.count<100)&nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ