Can you have 2 url's that point to the same page in an asp:Menu control?

后端 未结 4 2110
甜味超标
甜味超标 2021-02-19 19:36

I have an asp:Menu and it contains a top level menu item that points to http://www.example.com/one.aspx. When you hover over the top level menu item, it shows a dropdown and on

4条回答
  •  礼貌的吻别
    2021-02-19 20:00

    I had the same problem and used a slight variation of your solution: I added anchors to the URL, e.g:

    • http://www.example.com/one.aspx#1
    • http://www.example.com/one.aspx#2

    BTW: I was using a sitemap file, and when you add to nodes with the same URL to that file, then the error/exception is pretty clear:

    Multiple nodes with the same URL '/WebSite1/MyPage.aspx' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs.

    So I guess it really is not possible to have to identical URLs.

提交回复
热议问题