Wednesday, August 26, 2009

ASP.Net asp:Menu Safari Browser Error...

ASP.Net asp:Menu Safari Browser Error no dropdown

Just like everyone else, I used the standard off the shelf menu control (replacing my SPRY menu) to get better server side functionality.

So I brag about the upgrades to the system with a friend of mine, he pulls out his IPhone and tries to navigate through the site and sure enough, the menus dont work.

So much for "cross platform" controls.

Well, the solution is fairly simple, add ClientTarget="uplevel" to the <@Page declaration.

<%@ Page Language="VB" .... ClientTarget="uplevel"%>

However, if you have the menu on the Master page (like I did) it does not make sense to write this on every page (too time consuming) instead, add one of the ASP.Net's special folder called "App_Browsers" and add a file "safari.browser"
And simply add
  <browser refID="safari1plus">
      <adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />

This should do the trick.

Hope this helps.


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]