Last post Nov 11, 2008 11:10 PM by rblaettler
Nov 04, 2008 08:50 PM|rblaettler|LINK
I'm using the CSSFriendly.MenuAdapter for all default browsers, but now we would like a different Adapter if the user access the page with an iPhone. I have a basic prototype of the new Adapter, but the problem is that if I had that to my .browser file,
it does not recognize it. For testing, I just use the normal Safari. Here is the file:
The idea is that every browser, BUT Safari would use the Default setting. But Safari is using the Default Setting too. If I remove the Default setting, Safari does use my own Adapter and all other browsers just display the Standard Menu. How do I get this
to work? I've tried a different sequence too.
Nov 11, 2008 11:10 PM|rblaettler|LINK
Never really got a response and couldn't find a solution either. So, please, if you know something, let me know.
What I figured out is how you can just replace the Adapter in your code like this:
protected override void OnPreInit(EventArgs e)
HttpContext.Current.Request.Browser.Adapters["System.Web.UI.WebControls.Menu, System.Web, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"] = "Supertext.Adapters.iUiMenuAdapter";
protected override void OnUnload(EventArgs e)
HttpContext.Current.Request.Browser.Adapters["System.Web.UI.WebControls.Menu, System.Web, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"] = "CSSFriendly.MenuAdapter";
More on my
blog post about this topic. Hope it helps someone.