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
<browsers>
  <browser refID="safari1plus">
    <controlAdapters>
      <adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
    </controlAdapters>
  </browser>
</browsers>


This should do the trick.

Hope this helps.

Alwayz
Smit

Comments:

Post a Comment

Subscribe to Post Comments [Atom]





<< Home

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

Subscribe to Posts [Atom]