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

ASP.NET ÈçºÎ£ºÅäÖöà¸öÕ¾µãµØͼºÍÕ¾µãµØͼÌṩ³ÌÐò


      ĬÈÏÇé¿öÏ£¬ASP.NET ÍøÕ¾µ¼º½Ê¹ÓÃÒ»¸öÃûΪ Web.sitemap µÄ XML Îļþ£¬¸ÃÎļþÃèÊöÍøÕ¾µÄ²ã´Î½á¹¹¡£µ«ÊÇ£¬Äú¿ÉÄÜҪʹÓöà¸öÕ¾µãµØͼÎļþ»òÕ¾µãµØͼÌṩ³ÌÐòÀ´ÃèÊöÕû¸öÍøÕ¾µÄµ¼º½½á¹¹¡£
ÀýÈ磬Äú¿ÉÒÔ¾ßÓÐÒýÓÃ×ÓÕ¾µãµØͼµÄÖ÷Õ¾µãµØͼ¡£Ö÷Õ¾µãµØͼ¿ÉÒÔÊÇ£º
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode  title="Home Page"  description="">
    <siteMapNode title="First Level 1"  description="" />
    <siteMapNode  title="First Level 2" description="">
      <siteMapNode  title="Second Level 1" description=""/>
      <siteMapNode  title="Second Level 2" description=""/>
    </siteMapNode>
    <siteMapNode siteMapFile="child.sitemap" />
  </siteMapNode>
</siteMap>
×ÓÕ¾µãµØͼ¿ÉÒÔÊÇ£º
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode  title="Child First Level 1"  description="">
    <siteMapNode title="Child Second Level 1"  description="" />
    <siteMapNode  title="Child Second Level 2"  description="" />
    <siteMapNode  title=""  description="" />
  </siteMapNode>
</siteMap>
´ÓÁ½¸öÕ¾µãµØͼÉú³ÉµÄ²Ëµ¥½«ÏÔʾÈçÏ£º
Home Page
  First Level 1
  First Level 2
    Second Level 1
    Second Level 2
  Child First Level 1
    Child Second Level 1
    Child Second Level 2
ÈôҪΪһ¸öÍøÕ¾ÅäÖöà¸öÕ¾µãµØͼ£¬Çë´ÓÓ¦ÓóÌÐò¸ùĿ¼ÏµÄÕ¾µãµØͼ¿ªÊ¼¡£ÔÚ Web.config ÎļþÖн«¸ùÌṩ³ÌÐòÅäÖÃΪĬÈϵÄÕ¾µãµØͼÌṩ³ÌÐò¡£È»ºó£¬Í¨¹ýÔÚ SiteMapNode ¶ÔÏóÖÐÒýÓÃ×ÓÕ¾µãµØͼ»òÌṩ³ÌÐòÀ´Á´½Óµ½Ëü


Ïà¹ØÎĵµ£º

ASP.NET ÔÚ ASP.NET ÍøÒ³ÖÐÑéÖ¤Óû§ÊäÈë

 
      ͨ¹ýʹÓÃÑéÖ¤¿Ø¼þ£¬¿ÉÒÔÏò ASP.NET ÍøÒ³ÖÐÌí¼ÓÊäÈëÑéÖ¤¡£ÑéÖ¤¿Ø¼þΪËùÓг£Óõıê×¼ÑéÖ¤ÀàÐÍ£¨ÀýÈ磬²âÊÔij·¶Î§ÄÚµÄÓÐЧÈÕÆÚ»òÖµ£©ÌṩÁËÒ»ÖÖÒ×ÓÚʹÓõĻúÖÆ£¬ÒÔ¼°×Ô¶¨Òå±àдÑéÖ¤µÄ·½·¨¡£´ËÍ⣬ÑéÖ¤¿Ø¼þ»¹ÔÊÐí×Ô¶¨ÒåÏòÓû§ÏÔʾ´íÎóÐÅÏ¢µÄ·½·¨¡£ÑéÖ¤¿Ø¼þ¿ÉÓë ASP.NET ÍøÒ³ÉϵÄÈκοؼ ......

asp.netÂÒÂë´¦Àí

ÔÚWeb.ConfigÎļþÀïÃæ
<system.web>
   ¼ÓÈëÒ»ÏÂÕâ¶Î´úÂë
</system.web>
<globalization requestEncoding="GB2312" responseEncoding ="GB2312"/>
˳±ã˵һÏÂUrlencodeµÄ±àÂë¼¼ÇÉ¡£
System.Web.HttpUtility.UrlEncode(str, Encoding.GetEncoding("GB2312"));
¿ÉÒÔ¸ù¾ÝÐèҪȥ¸ñʽ»¯UrlµÄ ......

ASP.NET ¶ÔFileUpLoadÑéÖ¤£¬ÉÏ´«Í¼Æ¬µ½Îļþ

(1) ASP.NET µÄÊý¾ÝÑéÖ¤¿Õ¼þRegularExpressionValidator ʵÏÖÑéÖ¤FileUpLoadÉÏ´«ÎļþµÄÀàÐÍ
 <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="FileUpload1"
        ErrorMessage="¸ñʽ²»×¼È·£¬Ö»ÄÜ(.jpg|.JPG|.gif|.G ......

ASP.NET SiteMapPath Web ·þÎñÆ÷¿Ø¼þ¸ÅÊö

 
      SiteMapPath ¿Ø¼þ°üº¬À´×ÔÕ¾µãµØͼµÄµ¼º½Êý¾Ý¡£´ËÊý¾Ý°üÀ¨ÓйØÍøÕ¾ÖеÄÒ³µÄÐÅÏ¢£¬Èç URL¡¢±êÌ⡢˵Ã÷ºÍµ¼º½²ã´Î½á¹¹ÖеÄλÖá£Èô½«µ¼º½Êý¾Ý´æ´¢ÔÚÒ»¸öµØ·½£¬Ôò¿ÉÒÔ¸ü·½±ãµØÔÚÍøÕ¾µÄµ¼º½²Ëµ¥ÖÐÌí¼ÓºÍɾ³ýÏî¡£
 
ÏÂÃæµÄ´úÂëʾÀýÑÝʾ°üº¬ÔÚ Web.sitemap ÎļþÖеÄÕ¾µãµØͼÊý¾Ý¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ