你可以有2个网址的这一点上,在同一页面中一个asp:菜单控制? [英] Can you have to 2 url's that point the the same page in an asp:Menu control?

查看:223
本文介绍了你可以有2个网址的这一点上,在同一页面中一个asp:菜单控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp:菜单,它包含指向 http://www.abc.com/顶级菜单项one.aspx 。当你将鼠标悬停在顶级菜单项,它显示一个下拉菜单和选择之一是一个指向 HTTP:// WWW。 abc.com/one.aspx 。显然,我不能做到这一点,所以我一直把一个?在第二URL的末尾来解决这个问题。我很好奇,如果它是可能有两个指向同一位置,在ASP网址:菜单

I have an asp:Menu and it contains a top level menu item that points to http://www.abc.com/one.aspx. When you hover over the top level menu item, it shows a dropdown and one of the selections is One which points to http://www.abc.com/one.aspx. Apparently, I can't do this, so I have been putting a ? at the end of the second url to get around this. I was curious as to if it is possible to have two of urls pointing to the same location in an asp:Menu?

推荐答案

我有同样的问题,用解决方案的一个细微的变化:我添加锚点到URL,例如:

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

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

BTW:我使用的是sitemap文件,当您添加到节点具有相同的URL到该文件,然后将错误/例外是pretty明确的:

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:

与相同的URL多​​个节点
  /WebSite1/MyPage.aspx'是
  找到。 XmlSiteMapProvider要求
  该站点地图节点具有唯一的网址。

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

所以我想这真的是不可能有相同的URL。

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

这篇关于你可以有2个网址的这一点上,在同一页面中一个asp:菜单控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆