Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.net 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 .net 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

C#
<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>


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-
Posted
Updated 10-Nov-11 23:20pm
v5

 
Share this answer
 
Comments
Jephunneh Malazarte 11-Nov-11 5:28am    
sorry didn't see your post thanks thatraja :) really appreciate it.
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.

HTML
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title></title>
</head>
 
Share this answer
 
Comments
thatraja 11-Nov-11 5:33am    
I'm glad you have posted a solution yourself, Take a 5!
Member 8381743 13-Dec-11 13:54pm    
thanx it's solved my problem

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900