问题描述
我有一个使用asp.net菜单控件的网站
I have a site that makes use of the asp.net menu control
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false"
IncludeStyleBlock="false" Orientation="Horizontal" SkipLinkText="" RenderingMode="List">
除了在iPad和iPhone上,它都可以正常工作.升级到iOS5后,出现了一种新的行为:点击顶层菜单会下拉菜单项列表,但是现在并没有保持打开状态,而是立即关闭了该列表.
有趣的是,在升级之前,只要轻按列表中的一个菜单项,该列表就可以保持打开和关闭状态.
Which works fine except on iPad and iPhone. After upgrading to iOS5, a new behavior emerged: tapping on the top level menu drops down the list of menu items, but instead of staying open, the list now immediately closes.
Interestingly enough, prior to upgrading, the list would simply stay open and close when one tapped a menu item from the list.
Any help overcoming this would be appreciated.
推荐答案
MenuItem Category = new MenuItem();
Category.Text = menuRow["Category"].ToString().Trim();
Category.Value = menuRow["Category"].ToString().Trim();
Category.NavigateUrl = "javascript:(function(){})();";
现在,在iPad/iPhone上轻按一下,菜单将保持打开状态,而其他浏览器似乎没有受到影响(悬停仍然有效).
Now a tap on the iPad/iPhone holds the menu open, and other browsers don''t seem to be affected (hover still works).
这篇关于asp.net 4.0菜单控件和iPad的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!