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>ÕâÒ»¾ä
Ïà¹ØÎĵµ£º
1£©´´½¨txtÎļþ¡¾web.config¡¿
--------------------------------------------------------------------
<appSettings>
<add key="EditChars" value="D:\Site\ZJPS\TextFile\EditChars.txt"/>
</appSettings>
2) Ò³ÃæµÄCSÎļþÖУº
--------------- ......
ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔǰµÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕß¶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......
61.²úÉúÒ»¸öintÊý×飬³¤¶ÈΪ100£¬²¢ÏòÆäÖÐËæ»ú²åÈë1-100£¬²¢ÇÒ²»ÄÜÖØ¸´¡£
int[] intarr=new int[100];
arraylist mylist=new arraylist();
random rnd=new random();
while(mylist.count<100)&nb ......
81.ʲôÊÇsoap,ÓÐÄÄЩӦÓá£
´ð£ºsimple object access protocal,¼òµ¥¶ÔÏó½ÓÊÜÐÒé.ÒÔxmlΪ»ù±¾±àÂë½á¹¹,½¨Á¢ÔÚÒÑÓÐͨÐÅÐÒéÉÏ(Èçhttp,²»¹ý¾Ý˵msÔÚ¸ã×îµ×²ãµÄ¼Ü¹¹ÔÚtcp/ipÉϵÄsoap)µÄÒ»Öֹ淶web serviceʹÓõÄÐÒé..
82.c#ÖÐ property Óë a ......
121.ÃèÊöÒ»ÏÂc#ÖÐË÷ÒýÆ÷µÄʵÏÖ¹ý³Ì£¬ÊÇ·ñÖ»Äܸù¾ÝÊý×Ö½øÐÐË÷Òý£¿
´ð£º²»ÊÇ¡£¿ÉÒÔÓÃÈÎÒâÀàÐÍ¡£
122.ÔÚc££ÖУ¬string str = null Óë string str = " " Ç뾡Á¿Ê¹ÓÃÎÄ×Ö»òͼÏó˵Ã÷ÆäÖеÄÇø±ð¡£
´ð£ºnullÊÇÃ»Ó ......