ASP.NET Menu not working in google chrome [Resolved]

Posted by Vaibhav21791 under ASP.NET on 8/27/2012 | Points: 10 | Views : 8651 | Status : [Member] | Replies : 4
Hi,

i have created one asp.net menu using Menu control ,sub menu's display correctly in ie and firefox but in case of google chrome it not display.




Responses

Posted by: Vaibhav21791 on: 8/28/2012 [Member] Starter | Points: 25

Up
0
Down

Resolved
thanks a lot...

i use following code to solve this issue.just add the following code in the load event of the page.it works.

If Request.UserAgent.IndexOf("AppleWebKit") > 0 Then
Request.Browser.Adapters.Clear()
End If



Vaibhav21791, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: .Netlearner on: 8/27/2012 [Member] Starter | Points: 25

Up
0
Down
Can you provide the sample code u have done

Vaibhav21791, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vaibhav21791 on: 8/27/2012 [Member] Starter | Points: 25

Up
0
Down
i have used the following code to create menu.
<asp:Menu ID="MenuCollection" runat="server" Orientation="Horizontal"
StaticMenuItemStyle-CssClass="StaticmenuItem" DynamicMenuItemStyle-CssClass="StaticmenuItemhover">
<StaticHoverStyle CssClass="DynamicmenuItem" />
<DynamicHoverStyle CssClass="DynamicmenuItem" />
<Items>
<asp:MenuItem Text="Home" NavigateUrl="~/Home.aspx" Value="home">
</asp:MenuItem>
<asp:MenuItem Text="About Us" NavigateUrl="~/AboutUS.aspx" Value="AboutUs"></asp:MenuItem>
<asp:MenuItem Text="Collections" Value="Collections">
</asp:MenuItem>
<asp:MenuItem Text="Wholesale Query" Value="WholesaleQuery" NavigateUrl="~/WholeSaleQuery.aspx">
</asp:MenuItem>
<asp:MenuItem Text="Contact Us" NavigateUrl="~/ContactUs.aspx" Value="ContactUS"></asp:MenuItem>
</Items>
</asp:Menu>
---------------------------------------------------------------------------------------------------------------
i have added submenu's in collection menu through code(database).
If Not IsPostBack Then
For count As Integer = 0 To dt.Rows.Count - 1
Dim mnuLinkItem As New MenuItem()
mnuLinkItem.Text = dt.Rows(count)(1).ToString()
mnuLinkItem.Value = dt.Rows(count)(1).ToString()
mnuLinkItem.NavigateUrl = "~/RegularCollection.aspx?cat=" & dt.Rows(count)(1).ToString()
MenuCollection.Items.Item(2).ChildItems.Add(mnuLinkItem)
Next


End If
-----------------------------------------------------------------------------------------------------------
the above code is work fine on firefox and ie but not in google chrome.problem is that submenu's not display...



Vaibhav21791, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vforvijay on: 8/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi..
Refer the below link to find the solution for asp.net menu working in chrome browser..
http://www.dotnetcode.in/2012/03/solution-for-aspnet-menu-control.html


Vaibhav21791, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response