Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi friends my menu list Control in asp.net 3.5 is not working properly in google chrome


please help me friends am in urgent



CSS
.menu_style
        {
            font-family: Verdana, Arial, Helvetica, sans-serif;
            font-size: 11px;
            color: #000000;
            border: 1px solid #C8B678;
            color: #806000;
            background-color: #FFF7DD;
           
        }
        .menuStylehover
        {
            color: #EEEBE6;
            border: 1px Solid #C8B678;
            background-color: #A47E00;
           
            text-decoration: none;
        }




ASP.NET
<asp:Menu ID="Menu1" StaticMenuItemStyle-CssClass="menu_style" StaticHoverStyle-CssClass="menuStylehover"
                    DynamicHoverStyle-CssClass="menuStylehover" DynamicMenuItemStyle-CssClass="menu_style"
                    runat="server" Height="88px" Width="266px" style="margin: 10px auto;">
                    <staticmenuitemstyle cssclass="menu_style"></staticmenuitemstyle>
                    <dynamichoverstyle cssclass="menuStylehover"></dynamichoverstyle>
                    <dynamicmenuitemstyle cssclass="menu_style"></dynamicmenuitemstyle>
                    <staticitemtemplate>
                        <%# Eval("Text") %>
                        <asp:Label runat="server" ID="lbItmCount">[<%#Eval("ChildItems.Count")%>]
                    </staticitemtemplate>
                    <statichoverstyle cssclass="menuStylehover"></statichoverstyle>
Posted
Updated 29-Dec-12 0:04am
v3
Comments
StackQ 29-Dec-12 4:55am    
ya we know ur train is going!!!! keep patience
Abhishek Pant 29-Dec-12 5:03am    
:laugh: post your code here..

1 solution

To solve this you will need to tell .net the capabilities of the browser. For .net 2.0 & above you need to create a new browers file with the capabilities and upload it to your server.

In VS2008 Solution Explorer right click your application and add the “ASP.Net Folder” App_Browsers if you don’t already have it.
Add a New “Browser File” item to this special folder and call it safari.browser (if fixing the problem for Chrome)
Delete all the default stuff VS put in this file and replace it with the following:
<browsers>
<browser refid="safari1plus">
<controladapters>
<adapter controltype="System.Web.UI.WebControls.Menu" adaptertype="">



Save your file & test locally to see if all is well.
Now for the annoying bit. Upload the new app_browser folder & file to your production server, if you have used the “copy web site” menu option to upload or sharepoint or frontpage, these will create a new folder under app_browsers called vti_cnf
Manually delete the vti_cnf folder under app_browser on your production server. If you don’t you’ll get “Parse error: Data at the root level is invalid. Line 1, position 1.” in your new safari.browser file.
Remember to manually delete this vti_cnf folder everytime you make a change to the app_browser folder or contained files.
So there you go, how to solve the control rendering problems with Google’s Chrome.



http://fabenterprises.wordpress.com/2009/03/21/aspnet-menu-not-rendering-correctly-in-googles-chrome/[^]
 
Share this answer
 
v2
Comments
sreeCoderMan 29-Dec-12 5:56am    
<browsers>
<browser refID=”safari1plus”>
<controladapters>
<adapter controltype="”System.Web.UI.WebControls.Menu”" adaptertype="”"">

</browser>
</browsers>

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