Menu Close

ASP.NET Menu control doesn’t display properly in Chrome/Safari

There is an issue with the current versions of Chrome and Safari browsers that can cause the ASP.NET menu control to not render properly.  If you are interested in understanding the how and why behind this, there is a great forum post here that describes the issue in more detail.  If you are like me and need to resolve the issue now so your site displays properly, here is a quick fix for the problem.

You need to put the following code into the Load event of your page’s (or master page’s) code behind file:

If Request.UserAgent.IndexOf(“AppleWebKit”) > 0 Then

      Request.Browser.Adapters.Clear()

End If

There may be other solutions to this issue, but this appears to be one of the simpler fixes.  Hope this helps!