ASP.NET中的菜单控件与浏览器有关的问题 [英] menu control in asp.net problem with browsers

查看:47
本文介绍了ASP.NET中的菜单控件与浏览器有关的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在我的应用程序中,我正在使用asp.net菜单控件,但是此控件面临一个小问题,那就是当我将鼠标放在菜单控件上时,我没有弹出子菜单.当时我在母版页上写了以下代码,因为我遇到了其他问题.


在我的本地系统Internet Explorer版本7中,当我运行asp.net本地应用程序时,我正在获取菜单,但同一应用程序托管在某个托管服务器上,并尝试从同一主机(即7)访问该应用程序,但是我没有子菜单弹出

在另一个我正在使用i.e8的系统中,这里的问题是相反的,

当我在本地运行应用程序时,没有弹出子菜单,但是在具有相同i.e8浏览器的同一系统中,我试图访问托管在托管服务器中的应用程序,但出现了子菜单弹出

在这里,我正在编写我在母版页中用于获取菜单的代码,即

Hi
In my application i am using asp.net menu control, but i am facing small problem with this control, which is when i am placing the mouse on the menu control i am not getting the sub menu popups. At that i am written the following code on the master page for that i am getting some other problem which is.


in my local system internet explorer version 7, when i am running my asp.net local application i am getting the menus but the same application hosted on the some hosting server and try to access the application from the same i.e 7 i am not getting the sub menus popup

in another system i am using i.e8, here the problem is reverse,

when i am running the application locally i am not getting the sub menus popup, but in the same system with the same i.e8 browser i am trying to access the application which is hosted in a hosting server i am getting the sub menus popup

here i am writing the code which i used in master page to getting menus in i.e

protected void Page_Init(object sender, EventArgs e)
        {
          
            //The Following Code is required to make sure Menu is displayed properly in any browser.
            if (Request.ServerVariables["http_user_agent"].IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) != -1)
            {               
                Request.Browser.Adapters.Clear();
            }
       
      
        }


而且我的浏览器还有一个问题,那就是菜单,我们为主菜单项应用了边框样式,但它在Internet Explorer上有效,但在Mozilla fire fox中却不可用

对于这个问题,我将发送附在其上的屏幕截图
如果有任何熟悉这些问题的机构,请为此发送必要的解决方案.如果您有任何链接,请转发给我
谢谢问候
v.s.r.k.raju

因为它尚未完全实现,但是在当前链接的开发票"主菜单中有已归档的发票


and i am also have one more issue with browser which is for the menu we applied style which is border for the main menu items but it is working on the internet explorer but it is not working in the Mozilla fire fox

for this is issue i am send a screen shot attaching to it post
if any body familiar with these issues please send the necessary solution for this. and if you have any links please forward me
Thanks& Regards
v.s.r.k.raju

because it is not implemented completely but in the current link "invoicing" main menu have the invoice archieved

推荐答案

添加该代码后,它就适用于所有浏览器
After adding this one it''s work for all browsers
if (Request.UserAgent.IndexOf("AppleWebKit") > 0)
{
Request.Browser.Adapters.Clear();
}


对于IE8 ...
在StyleSheet中添加CSS专业知识


for IE8...
Add css Proferty in StyleSheet

.IE8Fix
{
    z-index: 1000;
}


并按如下所示添加css属性...


and add the css property as follows...

<asp:Menu runat="server" >
  <DynamicMenuStyle CssClass="IE8Fix" />
</asp:Menu>


您好,
尝试在兼容性视图中使用浏览器.
请注意,这仅适用于Internet Explorer.
要以兼容性方式查看它,请转到工具"->兼容性视图".
Hi there,
Try using the browser in compatibility view.
Note this is for Internet Explorer only.
To view it in compatibility go to Tools-> compatibility View.


这篇关于ASP.NET中的菜单控件与浏览器有关的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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