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

asp.netÖÐÈçºÎʹÓÃ΢ÈíµÄURLRewriter½øÐÐurlÖØÐ´

asp.netÖÐÈçºÎ½øÐÐurlÖØÐ´£¬½ñÌìÑо¿ÁËÒ»ÌìÕâ¸öÎÊÌâ
ÏëʵÏÖÖîÈ磺http://www.51cto.com/2008/2/2
http://www.51cto.com/default.html
µÈÕâÖÖurl
µ±È»£¬³ÌÐòÖ±½ÓÉú³É¾²Ì¬Ò³Ãæ¿ÉÒÔʵÏÖµÄ
µ«ÊÇÄÇÑùÒªÉú³ÉºÜ¶àÕâÖÖÒ³ÃæÒÔ¼°Îļþ¼Ð
¶øÇÒÔÚÊý¾ÝÁ¿´óµÄÇé¿öÏÂÉú³ÉÊǺÜÀË·Ñʱ¼äµÄ
ÔÚÕâÖÖÇé¿öϾÍҪʵÏÖurlÖØÐ´ÁË£¬µ±È»¾ÍºÜ¶àÖÖ·½·¨
ÏÂÃæ½éÉܵÄÊÇ΢ÈíµÄURLRewriter·½·¨
1.Ê×ÏÈÏÂÔØURLRewriter.dll£¬ÏÂÔØÖ®ºóÖ±½Ó¸´ÖƵ½ÄãµÄÍøÕ¾µÄbinĿ¼ÖÐ
2.ÅäÖÃÄãµÄweb.configÎļþ
ÔÚ<configuration>½ÚµãϼÓ
<configSections>
    <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
  </configSections>
<RewriterConfig>
    <Rules>
     <!--Ò»ÏÂÈý¸öÊÇÎÒ×Ô¼ºÐ´µÄ²âÊԵ쬵±È»Äã¿ÉÒÔдºÜ¶à¸ö -->
     <!--Õâ¸öÊǰÑhttp://localhost:2001/default.aspx?id=1 Éú³Éhttp://localhost:2001/d1.aspx ÕâÖÖÒ³Ãæ -->
      <RewriterRule>
        <LookFor>~/d(\d{0,5})\.aspx</LookFor>
        <SendTo>~/default.aspx?ID=$1</SendTo>
      </RewriterRule>
    <!--Õâ¸öÊǰÑhttp://localhost:2001/article.aspx?id=1 Éú³Éhttp://localhost:2001/1/a.html ÕâÖÖÒ³Ãæ -->
      <RewriterRule>
        <LookFor>~/(\d{0,5})/a\.html</LookFor>
        <SendTo>~/article.aspx?id=$1</SendTo>
      </RewriterRule>
    <!--Õâ¸öÊǰÑhttp://localhost:2001/test.aspx?id=1 Éú³Éhttp://localhost:2001/1/ ÕâÖÖÒ³Ãæ -->
      <RewriterRule>


Ïà¹ØÎĵµ£º

C# ASP.NET »ñÈ¡½Å±¾Óï¾ä²¢ÓÃÎı¾µÄ·½Ê½ÏÔʾ³öÀ´

protected void Button6_Click(object sender, EventArgs e)
    {
        this.Label11.Text = HtmlEncode(this.TextBox3.Text);
 
       
    }
    protected static string HtmlEn ......

Asp.netÍøÕ¾¿ª·¢¼Ü¹¹Éè¼ÆÒªÇó


ÍøÕ¾ÎļþÃû£º
1¡¢ ÍøÕ¾ÎļþÃûÒÔ±ê×¼Ó¢Îĵ¥´ÊÃèÊöÒµÎñÄÚÈÝ¡£Èç¹û1¸öÓ¢Îĵ¥´ÊÎÞ·¨ÃèÊö£¬¿ÉÒÔÔö¼Ó2¸ö»òÕß3¸ö£¬µ«¾¡Á¿ÎªÍêÈ«µ¥´Ê£¬ÀýÈçarticle.aspx/ articleView.aspx /    articleList.aspx µÈ¡£
2¡¢ ÎļþÃû¾¡Á¿²»ÓÃÊý×ÖÃèÊö¡£
3¡¢ ÎļþÃû¾¡Á¿²»ÄÜÌ«³¤£¬ÒÔ²»³¬¹ý20¸ö×ÖĸΪÒË¡£
4¡¢ ͼƬÎļþÃû¾¡Á¿ÃèÊöÍ ......

ASP.NET ·þÎñÆ÷¿Ø¼þäÖȾµ½¿Í»§¶ËÖ®ºó¶ÔÓ¦µÄHTML±êÇ©

·þÎñÆ÷¿Ø¼þ        html±ê¼Ç
label----------<span/>
button---------<input type="submit"/>
textbox--------<input type="text"/>
linkbutton-----<a href="javascript:" />
imagebutton----<input type="image"/>
hyperlink------<a />
......

asp.netÖг£ÓõÄÓÅ»¯ÐÔÄܵķ½·¨

1. Êý¾Ý¿â·ÃÎÊÐÔÄÜÓÅ»¯¡¡
¡¡
Êý¾Ý¿âµÄÁ¬½ÓºÍ¹Ø±Õ
·ÃÎÊÊý¾Ý¿â×ÊÔ´ÐèÒª´´½¨Á¬½Ó¡¢´ò¿ªÁ¬½ÓºÍ¹Ø±ÕÁ¬½Ó¼¸¸ö²Ù×÷¡£ÕâЩ¹ý³ÌÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»»ÐÅÏ¢ÒÔͨ¹ýÉí·ÝÑéÖ¤£¬±È½ÏºÄ·Ñ·þÎñÆ÷×ÊÔ´¡£ASP.NETÖÐÌṩÁËÁ¬½Ó³Ø(Connection Pool)¸ÄÉÆ´ò¿ªºÍ¹Ø±ÕÊý¾Ý¿â¶ÔÐÔÄܵÄÓ°Ï졣ϵͳ½«Óû§µÄÊý¾Ý¿âÁ¬½Ó·ÅÔÚÁ¬½Ó³ØÖУ¬ÐèҪʱȡ³ö£¬¹Ø±ÕÊ±Ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ