I used the following code in the cs file of the masterpage to fix the rendering issue of the safari and the asp:menu control. I was curious on why it actually fixes the problem. Here is the code:
protected override void AddedControl(Control control, int index) { if (Request.ServerVariables['http_user_agent'].IndexOf('Safari', StringComparison.CurrentCultureIgnoreCase) != -1) this.Page.ClientTarget = 'uplevel'; base.AddedControl(control, index);
}
The problem is that ASP.NET erroneously recognizes Safari as a ‘downlevel’ browser (e.g. ancient). Your fix is forcing it to recognize it as a more modern browser that is capable of handling some of the menu’s javascript.
This will also work via a bunch of other techniques such as overriding Page_PreInit or adding a properly configured safari.browser to App_Browsers.