asp.netʵÏÖα¾²Ì¬
webconfigα¾²Ì¬
<system.web>
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
</httpHandlers>
</system.web>
<configuration>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/r_(.[\d]*).html</LookFor>
<SendTo>~/readbook.aspx?xd=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/(.[\d]*)_(.[\d]*).html</LookFor>
<SendTo><![CDATA[~/bookpage.aspx?cid=$1&xd=$2]]></SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/page(.[\d]*)_(.[\d]*).html</LookFor>
<SendTo><![CDATA[~/bookstore.aspx?page={0}&page1=$1&page2=$2]]></SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/page_b(.[\d]*).html</LookFor>
<SendTo><![CDATA[~/bookstore.aspx?page={0}&page2=$1]]></SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
</configuration>
ÐèҪעÒâµÄÊÇÐèÒªÔÚinternet¹ÜÀíÖÐIISÅäÖÃÌí¼ÓC:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll£¬²¢ÇÒ°ÑÀ©Õ¹ÃûÐÞ¸ÄΪ£º.html£¬£¬£¬£¬ÊÇ·ñ¼ì²éÎļþµÄÑ¡Ôñ¹´µô
Ïà¹ØÎĵµ£º
²½Ö裺
1¡¢ÏÈÔÚDÅ̽¨Ò»¸öÐÂÎļþ¼Ð
2¡¢´ò¿ªVS2008£¬Ð½¨Ò»¸öÍøÕ¾£¬¸ü¸ÄÃû×Öºó´æ·ÅÔÚ1ÖеÄÎļþ¼ÐÖУ¬´ËʱҪ¼ÇµÃ¸ø¸ÃÍøÕ¾½¨Ò»¸öеÄÎļþ¼Ð£¬×¨ÃÅÓÃÀ´´æ·Å¸ÃÍøÕ¾ËùÓеÄÎļþ£»
3¡¢´î½¨Êý¾Ý·ÃÎʲ㣬µã»÷Îļþ——Ìí¼Ó——н¨ÏîÄ¿——Àà¿â£¬¸ü¸ÄÃû×ÖÖ®ºó£¬´æ·ÅÔÚ1ÖеÄÎļþ¼ÐÖУ¬Í¬ÑùҲΪÊý ......
¾¹ý¶Ôasp.netµÄѧ£¬ÎÒ¾õµÃÔ½À´Ô½Á¦²»´ÓÐÄ°¡£¡ËµÊµ»°ÎÒÏÖÔÚ¶¼²»¸Ò˵×Ô¼ºÒѾÈëÃÅÁË£¡ÓÐʱºòÕæÏ룬ÎÒµ½µ×Êʺϲ»ÊʺÏѧÕâ¸ö£¬ÎÒ²¢²»ÊÇÓöµ½À§ÄѾÍÏëÌӱܣ¬Ö»ÊÇÎÒÕÒ²»µ½ºÏÊʵķ½·¨À´½â¾ö×Ô¼ºÓöµ½µÄÎÊÌâ¡£¶¼ËµÇ§ÄêÄ¥Ò»½££¬ÏÖÔÚ²ÅÕæÕýÈÏʶµ½£¬ÏëÒªµÃµ½µã¶ù¶«Î÷£¬Ã»Óе㸶³öºÍÎþÉüÊÇ¿ÉÄܵÄÊ£¡
&n ......
HiddenField ¿Ø¼þÌṩÁËÒ»ÖÖÔÚÒ³ÃæÖд洢ÐÅÏ¢µ«²»ÏÔʾÐÅÏ¢µÄ·½·¨¡£ÀýÈ磬¿ÉÒÔÔÚ HiddenField ¿Ø¼þÖд洢Óû§Ê×Ñ¡ÏîÉèÖã¬ÒÔ±ã¿ÉÒÔÔÚ¿Í»§¶Ë½Å±¾ÖжÁÈ¡´ËÉèÖá£ÈôÒª½«ÐÅÏ¢·ÅÈë HiddenField ¿Ø¼þÖУ¬ÇëÔÚÁ½´Î»Ø·¢Ö®¼ä½«Æä Value ÊôÐÔÉèÖÃΪҪ´æ´¢µÄÖµ¡£
Ò»¡¢¹¦ÄÜ
¿ÉÒÔʹÓà HiddenFi ......
Image Web ·þÎñÆ÷¿Ø¼þʹÄú¿ÉÒÔÔÚ ASP.NET ÍøÒ³ÉÏÏÔʾͼÏñ£¬²¢ÓÃ×Ô¼ºµÄ´úÂë¹ÜÀíÕâЩͼÏñ¡£
Ò»¡¢±³¾°
¿ÉÒÔÔÚÉè¼Æʱ»òÔËÐÐʱÒÔ±à³Ì·½Ê½Îª Image ¶ÔÏóÖ¸¶¨Í¼ÐÎÎļþ¡£»¹¿ÉÒÔ½«¿Ø¼þµÄ ImageUrl ÊôÐ԰󶨵½Ò»¸öÊý¾ÝÔ´£¬ÒÔ¸ù¾ÝÊý¾Ý¿âÐÅÏ¢ÏÔʾͼÐΡ£
Óë´ó¶àÊýÆäËû Web ·þÎñÆ÷¿Ø¼þ²»Í¬£ ......