Patto
Patto

Reputation: 147

asp:menu in safari and chrome

I have seen some posts of the asp:menu and the browsers Chrome and Safari here, but nevertheless, I think the problem that I have is different than other problems.

I am using the following code in order to display the menu:

protected void Page_Load(object sender, EventArgs e)
{
    if (Request.UserAgent.IndexOf("AppleWebKit") > 0)
    {
        Request.Browser.Adapters.Clear();
    }
...
}

However, the problem is still there if I start the browsers for the very first time, the menu is displayed vertically instead of horizontally. After a page refresh, the menu works fine... How is that possible? Or is the problem that simple,and I need to place the code in somewhere earlier (eg Page_PreInt).

Thanks in advance, Patto

Upvotes: 1

Views: 1355

Answers (2)

shani
shani

Reputation: 21

This fixed this problem for me : http://forums.asp.net/p/1543189/3810492.aspx#3810492

Upvotes: 2

Patto
Patto

Reputation: 147

what actually worked for me is putting this information into the App_Browser file instead

<browser refID="Default">
    <controlAdapters>
        <adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
    </controlAdapters>
</browser>

Upvotes: 3

Related Questions