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

£¨×ª£©ASP.NET URL Rewrite. URLÖØд


ASP.NET URL Rewrite. URLÖØд
ת×Ô£ºhttp://www.cnblogs.com/rickel/archive/2007/02/04/639616.html

URL ÖØдÊǽØÈ¡´«Èë Web ÇëÇó²¢×Ô¶¯½«ÇëÇóÖض¨Ïòµ½ÆäËû URL µÄ¹ý³Ì¡£
  ±ÈÈçä¯ÀÀÆ÷·¢À´ÇëÇóhostname/101.aspx £¬·þÎñÆ÷×Ô¶¯½«Õâ¸öÇëÇóÖж¨ÏòΪhttp://hostname/list.aspx?id=101¡£
urlÖØдµÄÓŵãÔÚÓÚ£º
    Ëõ¶Ìurl£¬Òþ²Øʵ¼Ê·¾¶Ìá¸ß°²È«ÐÔ
    Ò×ÓÚÓû§¼ÇÒäºÍ¼üÈë¡£
    Ò×ÓÚ±»ËÑË÷ÒýÇæÊÕ¼
¶þ ʵÏÖurlÖØдµÄ»ù±¾·½·¨
  
ÏÂÔØMSµÄURLRewriter.dll£¬·Åµ½ÄãµÄweb³ÌÐòµÄbinÏÂ
ÏÂÔصØÖ·1£ºhttp://www.rickel.cn/uploads/DevTools/MSDNURLRewriting.msi
ÏÂÔصØÖ·2£ºdownload.microsoft.com/download/0/4/6/0463611e-a3f9-490d-a08c-877a83b797cf/MSDNURLRewriting.msi
ÏÂÔØÍê³Éºó£¬ÔÚweb.configÀïÉèÖÃÈçÏ£º
<?
xml version="1.0" encoding="utf-8" 
?>
<!--
overred
-->
<
configuration
>
    <
configSections
>
        <
section 
name
="RewriterConfig"
type
="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"
 
/>
    </
configSections
>
    <
RewriterConfig
>
        <
Rules
>
            <
RewriterRule
>
                <
LookFor
>
~/d(\d+)\.aspx
</
LookFor
>
                <
SendTo
>
~/default.aspx?id=$1
</
SendTo
>
            </
RewriterRule
>
        </
Rules
>
    </
RewriterConfig
>
    <
system
.web
>
        <
httpHandlers
>
            <
add


Ïà¹ØÎĵµ£º

Èà ASP.Net MVC µÄURL¿´ÉÏÈ¥Ïñ¸ö´«Í³WebFormµÄURL

ÔÚIIS6Éϲ¿Êð¹ýASP.Net MVCµÄÒ»¶¨ÖªµÀ£¬ÎªÁËÄÜÈÃIIS½«¶ÔASP.Net MVCµÄÇëÇóת·¢¸øASP.Net´¦Àí£¬±ØÐëÌí¼ÓÓ¦ÓóÌÐòISAPIÓ³Éä¡£ ±ÜÃâÕâÖÖÓ³ÉäÌí¼ÓµÄÒ»ÖÖ·½·¨ÊÇÀûÓÃÒÑÓеÄÓ³É䣬ÀýÈç.aspxÀ©Õ¹ÃûµÄÓ³Éä¡£²»¹ýÄÇÑùµÄ»°ASP.Net MVCµÄUrl»áºÜ¡°ÄÑ¿´¡±£¬¡°http://localhost/ASPNETMVCAPP/Account.aspx/Logon/¡±¡£Èç¹ûÄÜ°ÑÆäÖеÄ.a ......

ASP.NETµ¯³öģʽ¶Ô»°´°¿Ú·â×°Àà

 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// <summary>
    /// javascriptµ¯³ö´°¿Ú·â×°Àà
    /// </summary>
    public static class JSCommon ......

ASP.NET MVC ÈëÃÅ

ÓÐʱºòÄãÏëÔÚµ÷ÓÃaction·½·¨Ö®Ç°»òÕßaction·½·¨Ö®ºó´¦ÀíһЩÂß¼­£¬ÎªÁËÖ§³ÖÕâ¸ö£¬ASP.NET MVCÔÊÐíÄã´´½¨action¹ýÂËÆ÷¡£Action¹ýÂËÆ÷ÊÇ×Ô¶¨ÒåµÄAttributes£¬ÓÃÀ´±ê¼ÇÌí¼ÓAction·½·¨Ö®Ç°»òÕßAction·½·¨Ö®ºóµÄÐÐΪµ½¿ØÖÆÆ÷ÀàÖеÄAction·½·¨ÖС£
һЩ¿ÉÄÜÓõ½Action¹ýÂËÆ÷µÄµØ·½ÓУº
ÈÕÖ¾,Òì³£´¦Àí
Éí·ÝÑéÖ¤ºÍÊÚȨ £­ ÏÞÖ ......

ASP.NETÖÐCookieµÄÓ÷¨

CookieΪ¿Í»§¶ËÐÅÏ¢´æ·Å¶ÔÏ󣬿ÉÒÔ°ÑÓû§µÄÐÅÏ¢±£´æÔÚÓû§±¾µØ£¬²»±Ø×ÜÊÇ·ÃÎÊ·þÎñÆ÷
ÓëSession²»Í¬£¬SessionΪÓû§È«¾Ö±äÁ¿£¬¶ÔÓÚ¸ÃÓû§µÄËùÓвÙ×÷¹ý³Ì¶¼ÓÐЧ¡£
//1¡£´´½¨Cookie¶ÔÏó
 HttpCookie newCookie = new HttpCookie("User");
//2¡£CookieÖÐÌí¼ÓÐÅÏ¢ÏΪ¼üÖµ¶Ô£¬key/value
newCookie.Values.Add("Name" ......

Asp.net ³£¼û´íÎó

´íÎó CS0001 ±àÒëÆ÷ÄÚ²¿´íÎó
´íÎó CS0003 ÄÚ´æÒç³ö
´íÎó CS0004 ÌáÉýΪ´íÎóµÄ¾¯¸æ
´íÎó CS0005 ±àÒëÆ÷Ñ¡ÏîºóÓ¦¸úÕýÈ·µÄ²ÎÊý
´íÎó CS0006 ÕÒ²»µ½¶¯Ì¬Á´½ÓµÄÔªÊý¾ÝÎļþ
´íÎó CS0007 .Net »·¾³³õʼ»¯´íÎó
´íÎó CS0008 ´ÓÎļþÖжÁÈ¡ÔªÊý¾Ý´í ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ