.Net菜单控件不适用于目标框架3.5

编程入门 行业动态 更新时间:2024-10-28 07:21:25
本文介绍了.Net菜单控件不适用于目标框架3.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 场景: 我遇到了一个有趣的场景,在我的旧PC上安装了Visual Studio2010.在那台PC上,我使用VS2010开发了一个指向.Net 3.5 Framework的应用程序. 当我移至新PC时(在工作中),我只是获取最新的源代码并运行该应用程序.在我的新PC中,我还安装了VS2010.除了asp菜单控件,其他所有东西都可以在我的Web应用程序中正常运行. 问题 当我将鼠标悬停在菜单上时,其菜单项未显示.我花了一些时间才知道,如果仅将Target Framework更改为4.0,则菜单将可以正常工作. 问题 如果asp:menu控件指向3.5框架,而我的旧PC指向3.5点,那么为什么它在我的新PC上不起作用?除非(在我的新电脑中)将其指向4.0 framework 重新创建步骤 1.使用VS 2010创建网站 2.添加网页只是不更改任何内容 3.并在aspx中添加以下代码,然后将其矮化

Hey Guys, Scenario: I come across an interesting scenario where in my old PC I have installed Visual Studio 2010. In that PC I developed an application using VS2010 pointing to .Net 3.5 Framework. When when I moved to my new PC (at work) I just get latest my source code and run the application. In my new PC I also have installed VS2010. Everything is working fine in my web application except for the asp menu control. Problem When i hover on the menu its menu item is not displaying. It took me sometime to figureout that if I change the Target Framework to 4.0 only then the menu will work perfectly fine. Question Why does asp:menu control won''t work in my new PC if it''s pointing to 3.5 framework while in my old PC pointing to 3.5 point it works perfectly fine. Unless (in my new pc) point it to 4.0 framework Steps to Recreate 1. Create website using VS 2010 2. Add webpage just don''t change anything 3. And add the following code in the aspx and runt it

<asp:Menu ID="Menu1" runat="server"> <Items> <asp:MenuItem Text="Parent WebSite1"> <asp:MenuItem Text="Child 1"></asp:MenuItem> <asp:MenuItem Text="Child 2"></asp:MenuItem> </asp:MenuItem> </Items> </asp:Menu>

我只是注意到我的旧电脑正在使用IE7,而我的新电脑正在使用IE8.似乎IE8出现了一个asp:menu问题.有人可以确认吗? (仅当您有时间时才:)谢谢.) 任何输入/想法都非常欢迎. 谢谢 -jeph-

I just notice that my old pc is using IE7 and my new pc is using IE8. And seems like there''s an asp:menu issue with IE8. Can anyone confirm? (only if you have time :) thanks.) Any inputs/ideas are very much welcome. Thankz -jeph-

推荐答案

您在这里 asp:IE8问题的菜单修复可用 [ ^ ] ASP.NET菜单和IE8呈现白色问题 [ ^ ] Here you go asp:menu fix for IE8 problem available[^] ASP.NET Menu and IE8 rendering white issue[^]

对此问题感到抱歉的人. 我需要在head标签下面添加meta标签,这应该可以解决问题. 问题不是在VS2010中指向较旧的框架,而是在IE8浏览器中. Guys sorry for the question found the fix. I need to add meta tag below inside the head tag and that should fix the problem. The issue is not in the VS2010 point to older framework but the IE8 browser. <head runat="server"> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title></title> </head>

更多推荐

.Net菜单控件不适用于目标框架3.5

本文发布于:2023-11-11 17:42:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1579127.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:控件   框架   不适用于   菜单   目标

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!