久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='t5g4r'></bdo><ul id='t5g4r'></ul>

    <i id='t5g4r'><tr id='t5g4r'><dt id='t5g4r'><q id='t5g4r'><span id='t5g4r'><b id='t5g4r'><form id='t5g4r'><ins id='t5g4r'></ins><ul id='t5g4r'></ul><sub id='t5g4r'></sub></form><legend id='t5g4r'></legend><bdo id='t5g4r'><pre id='t5g4r'><center id='t5g4r'></center></pre></bdo></b><th id='t5g4r'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='t5g4r'><tfoot id='t5g4r'></tfoot><dl id='t5g4r'><fieldset id='t5g4r'></fieldset></dl></div>
    <legend id='t5g4r'><style id='t5g4r'><dir id='t5g4r'><q id='t5g4r'></q></dir></style></legend>
    1. <small id='t5g4r'></small><noframes id='t5g4r'>

    2. <tfoot id='t5g4r'></tfoot>

      在 asp.net 中動態構建的 SiteMapPath

      Dynamically built SiteMapPath in asp.net(在 asp.net 中動態構建的 SiteMapPath)
        • <bdo id='EQdcP'></bdo><ul id='EQdcP'></ul>

              <tbody id='EQdcP'></tbody>

            <small id='EQdcP'></small><noframes id='EQdcP'>

            1. <tfoot id='EQdcP'></tfoot>

                <i id='EQdcP'><tr id='EQdcP'><dt id='EQdcP'><q id='EQdcP'><span id='EQdcP'><b id='EQdcP'><form id='EQdcP'><ins id='EQdcP'></ins><ul id='EQdcP'></ul><sub id='EQdcP'></sub></form><legend id='EQdcP'></legend><bdo id='EQdcP'><pre id='EQdcP'><center id='EQdcP'></center></pre></bdo></b><th id='EQdcP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='EQdcP'><tfoot id='EQdcP'></tfoot><dl id='EQdcP'><fieldset id='EQdcP'></fieldset></dl></div>
                <legend id='EQdcP'><style id='EQdcP'><dir id='EQdcP'><q id='EQdcP'></q></dir></style></legend>

              1. 本文介紹了在 asp.net 中動態構建的 SiteMapPath的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在嘗試使用 SiteMapPath 在我的網站上構建動態站點地圖.

                I'm trying to build a dynamic site map on my site using SiteMapPath.

                應該是這樣的:

                Home > Products > %product_name% > Prices
                

                其中 %product_name% 是在運行時動態設置的,具體取決于用戶的選擇.

                where %product_name% is set dynamically in the runtime, depending on the user's choice.

                我已經閱讀了很多關于該主題的文章并選擇了這個http://harriyott.com/2007/03/adding-dynamic-nodes-to-aspnet-site.aspx.它動態更改 web.sitemap XML 文件.問題是它仍然在開始時只構建站點地圖一次,然后在每個頁面上使用它.

                I've read many articles on the theme and choose this http://harriyott.com/2007/03/adding-dynamic-nodes-to-aspnet-site.aspx. It dynamically changes the web.sitemap XML file. The problem is that it still builds the sitemap only once in the beginning and then uses it on each page.

                我怎樣才能讓它在每個加載的頁面上重建?

                How can I make it to rebuild on each loaded page?

                推薦答案

                試試這個:

                右鍵單擊您的項目添加新項目",然后選擇站點地圖",它將具有如下所示的 XML 結構:

                Right click on your project "add new item" then choose "Site Map", it will have an XML structure that looks like:

                <?xml version="1.0" encoding="utf-8" ?>
                
                     <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
                
                       <siteMapNode url="~/Default.aspx" title="Home " description="">
                
                         <siteMapNode url="~/the page URL" title="Products"  description="" >
                
                             <siteMapNode url="~/the page URL" title=" %product_name%"  description="" >
                
                                 <siteMapNode url="~/the page URL" title="Prices"  description="" />
                
                             </siteMapNode >
                
                         </siteMapNode >
                
                       </siteMapNode >
                
                     <sitemap>
                

                ** 為每個節點添加描述是可選的.

                ** adding description for each node is optional.

                現在你需要把它放在你想要的地方,所以你在頁面的 HTML 端添加這段代碼:

                Now you need to place it where you want, so you add this code in the HTML side of the page:

                <asp:SiteMapPath ID="SiteMapPath1" runat="server">
                
                <CurrentNodeStyle CssClass="Some class" />
                
                   <PathSeparatorTemplate>
                
                      <img runat="server" alt="" src="an image to separate between nodes" height="5" width="5" />
                
                   </PathSeparatorTemplate>
                
                </asp:SiteMapPath>
                

                <小時>

                當然,您有兩頁 - 一頁是產品,一頁是價格.


                Of course you have two pages - one for product and one for prices.

                為 SiteMap 中的某個節點動態分配 Tile;在價格頁面中添加此代碼:

                To assign Tile dynamically for some node in the SiteMap; add this code in the Prices Page:

                1) 在頁面加載中:

                SiteMap.SiteMapResolve += new SiteMapResolveEventHandler(SiteMap_SiteMapResolve);
                

                2)在同一頁面(價格頁面)添加此功能:

                2) Add this function in the same page (prices page):

                 SiteMapNode SiteMap_SiteMapResolve(object sender, SiteMapResolveEventArgs e)
                {
                    SiteMapNode currentNode = SiteMap.CurrentNode.Clone(true);
                    SiteMapNode tempNode = currentNode;
                
                    tempNode.ParentNode.Title = "Change the Product name";
                    tempNode.ParentNode.Url = "Change the Product url";
                
                    return currentNode;
                }
                

                如您所見,您可以根據需要操作父節點,更改標題、url 等.我認為您也想更改 url;例如:product.aspx?ID=blah"

                As you can see you can manipulate the parent Node as you want, change the title, the url, etc. I think you want to change the url too; for example: "product.aspx?ID=blah"

                這篇關于在 asp.net 中動態構建的 SiteMapPath的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                GoogleWebAuthorizationBroker in MVC For Google Drive Access(MVC 中的 GoogleWebAuthorizationBroker 用于 Google Drive 訪問)
                Why do I get System.UnauthorizedAccessException Access to the path #39;Google.Apis.Auth#39; is denied(為什么我得到 System.UnauthorizedAccessException 對路徑“Google.Apis.Auth的訪問被拒絕) - IT屋-程序員軟件開發技術分享
                WinRT - How to ignore or delete page from navigation history(WinRT - 如何從導航歷史記錄中忽略或刪除頁面)
                Looking for a Visual Studio toolbox style navigation for desktop applications(尋找適用于桌面應用程序的 Visual Studio 工具箱樣式導航)
                access-like data navigation in WPF?(WPF中類似訪問的數據導航?)
                Windows Phone 8 navigation issue between pages(Windows Phone 8 頁面之間的導航問題)
                <legend id='S5RDx'><style id='S5RDx'><dir id='S5RDx'><q id='S5RDx'></q></dir></style></legend>

                    <tbody id='S5RDx'></tbody>

                    • <i id='S5RDx'><tr id='S5RDx'><dt id='S5RDx'><q id='S5RDx'><span id='S5RDx'><b id='S5RDx'><form id='S5RDx'><ins id='S5RDx'></ins><ul id='S5RDx'></ul><sub id='S5RDx'></sub></form><legend id='S5RDx'></legend><bdo id='S5RDx'><pre id='S5RDx'><center id='S5RDx'></center></pre></bdo></b><th id='S5RDx'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='S5RDx'><tfoot id='S5RDx'></tfoot><dl id='S5RDx'><fieldset id='S5RDx'></fieldset></dl></div>
                        <tfoot id='S5RDx'></tfoot>

                        <small id='S5RDx'></small><noframes id='S5RDx'>

                          <bdo id='S5RDx'></bdo><ul id='S5RDx'></ul>
                          主站蜘蛛池模板: chinese中国真实乱对白 | 亚洲成人福利在线观看 | 久久精品国产一区二区三区 | 一区二区三区四区五区在线视频 | 黄视频免费观看 | 一区二区免费在线视频 | 亚洲国产成人精品女人久久久 | 欧美综合一区二区三区 | 一区二区三区四区毛片 | 久久99精品久久久 | 黄色在线免费网站 | jizz在线免费观看 | 男人的天堂久久 | 久久网亚洲 | 精品欧美一区二区三区 | 免费不卡视频 | 天天天天操 | 免费观看毛片 | 久久久久国产精品一区二区 | 黄色免费网址大全 | 日韩在线一区二区 | 亚洲一区二区精品视频 | 免费视频一区二区 | 一区二区视频在线观看 | 久久亚洲精品国产精品紫薇 | 日日淫| 国产成人综合av | 欧美成人一区二区 | 九九99精品 | 伊人欧美视频 | 成人综合在线视频 | 天天看天天爽 | 色av一区二区三区 | 免费av直接看 | 少妇久久久久 | 91国内精精品久久久久久婷婷 | 99亚洲精品 | 亚洲精品视频在线 | 天天躁日日躁狠狠躁2018小说 | 日本成人中文字幕 | 久草热8精品视频在线观看 午夜伦4480yy私人影院 |