asp.netÖÐsitemapµÄ¼òµ¥ÊµÓÃ
֮ǰûÓÐÓùýsitemap£¬×î½ü×öÏîÄ¿²Å½Ó´¥µ½sitemap£¬Ôڴ˼Ǽ»ù±¾Ó÷¨£¬ÒÔ±¸ºóÓá£
»·¾³£ºvs2008
Ê×ÏÈ´´½¨sitemapÎļþ£¬ÓÒ»÷project->Add new item£¬µ¯³öÑ¡Ïî¿ò£¬Ñ¡ÔñSite Map£¬Ñ¡ÔñOk¡£ºÃÁËsitemapÎļþ¾Í´´½¨ºÃÁË¡£
ÏÂÃ濪ʼ±à¼ËüµÄÄÚÈÝ£¬Ð½¨µÄsitemapÎļþÖÐĬÈÏÄÚÈÝÈçÏ£º
<?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="" title="" description=""> <siteMapNode url="" title="" description="" /> <siteMapNode url="" title="" description="" /> </siteMapNode> </siteMap>
<siteMapNode>µÄÊôÐÔ£º
Url - Á´½ÓµØÖ·
Title - ÏÔʾµÄ±êÌâ
Description - ÃèÊö£¨ToolTip£©
resourceKey - ±¾µØ»¯Óõģ¨ÒªÔÚ<siteMap>½Úµã¼ÓÉÏÕâ¸öÊôÐÔenableLocalization=true£©
securityTrimmingEnabled - ÊÇ·ñÈÃsitemapÖ§³Ö°²È«ÌØÐÔ
roles - ÄÄЩ½ÇÉ«¿ÉÒÔ·ÃÎʵ±Ç°½Úµã£¬¶à½ÇÉ«ÓöººÅ¸ô¿ª£¨ÐèÒª½«securityTrimmingEnabledÉèÖÃΪtrue£©
siteMapFile - ÒýÓÃÁíÒ»¸ösitemapÎļþ
×¢£ºÓ¦ÓÃȨÏÞµÄʱºò£¬Web.configÖеÄSiteMap½ÚµãµÄProviderÒ²ÒªÓÐÏà¶ÔÓ¦µÄÅäÖã¨securityTrimmingEnabled="true"£©
Àý£º
<siteMapNode url="" title="" description="" roles="Administrator,Manager,NormalUser"> <siteMapNode url="~/Admin/ManageUser/Manage_Users.aspx" title="Manage Users" description="" roles="Administrator" /> <siteMapNode url="~/Admin/HotelInfo/Manage_Hotels.aspx" title="Manage Hotels" description="" roles="Manager"/> <siteMapNode url="~/Admin/RegionInfo/Region_List.aspx" title="Manage Regions" description="" roles="Administrator"/> <siteMapNode url="~/Admin/ManageTable/Manage_SelfDetails.aspx" title="Manage Tables" description="" roles="NormalUser"/>
ÆäÖÐrolesÊÇÐèÒª½øÐÐÉèÖõģ¬¿ÉÔÚÿ¸öĿ¼ÏµÄweb.configÖÐÉèÖᣠ½ÓÏÂÀ´ÔÚweb.configÖÐÅäÖÃsitemap£¬ <siteMap defaultProvider="SiteMapProvider"> <providers> <add name="SiteMapProvider" type="System.Web.XmlSiteMapProvider" securityTrimmingEnabled="true" siteMapFile="Web.sitemap"/> </providers> </siteMap> ×îºóÔÚMasterPageÖÐÓ¦ÓÃsitemap£¬ <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSourceDefault" Orientation="Horizontal"> <StaticMenuItemStyle ForeColor="White" ItemSpacing="10px" Font-Underline="false"/> <StaticSelectedStyle ForeColor="#99FFFF" /> <DynamicSelectedStyle ForeColor="#99FFFF" /> </asp:Menu> <asp:SiteMapDataSource ID="SiteMapDataSourceDefault" runat="server" SiteMapProvider="SiteMapProvider" ShowStartingNode="false"/>
ÍƼöÐÅÏ¢
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- Asp.net MVCÔ´Âë·ÖÎö--Model Validation(Se....
- .Net À¬»ø»ØÊÕ»úÖÆÔÀíºÍËã·¨£¨Ò»£©
- .netʵÌåнâ
- ·ÖÎöASP.NET¶ÁÈ¡XMLÎļþ4ÖÖ·½·¨
- »ñÈ¡ÍøÕ¾ËõÂÔͼ´úÂë
- Asp.net ¸ù¾ÝIPµØÖ·»ñÈ¡¿çÍø¶ÎmacµØÖ·º¯Êý¡¾ËѲء¿
- ¹ýÂËÃô¸Ð¹Ø¼ü×Ö¡£
- Éú³ÉÖ¸¶¨Î»ÊýµÄËæ»ú×Ö·û´®
- ¿Í»§¶Ë»ñÈ¡MACµØÖ·£¬µ½·þÎñÆ÷ÑéÖ¤
- ²½²½ÎªÓª .NETÈý²ã¼Ü¹¹½âÎö ¶þ¡¢Êý¾Ý¿âÉè¼Æ
ÆÀÂÛ