Fix ASP.NET Menu Layout Issue in Chrome and Safari

I had this menu issue which would not render properly in Chrome and Safari but run ok in Internet Explore and FireFox. The following is the fix. Put the following code at the top of your Page_load() function of the page where the issue exists.

/* Fix the Chrome and Safari Menu layout issue (ASP) */
if (Request.UserAgent.IndexOf("AppleWebKit") > 0)
{
Request.Browser.Adapters.Clear();
}

I copied this originally from somewhere. Can’t seem to find it.

Advertisements
This entry was posted in Troubeleshoot. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s