Easiest/Recommended Navigation Menu Control/Solution that works with Safari

  • 14 years ago

    Hi,

    This is my first post and I'm trying to find an easy solution for menu that works with Safari. The current menu control would be great if it worked in Apple Safari (the fly-outs don't work.) 

    I have read a couple posts about this issue: such as this http://forums.asp.net/1/1125883/ShowThread.aspx but haven't had any success with browsercaps etc with the current menu control. The only thing that I've seen work is this: http://www.asp.net/CSSAdapters/Menu.aspx however in my opinion it's pretty complicated. I've heard mixed things about Suckerfish Dropdowns and had used an image based javascript menu before.

    So I was just wondering if anyone out there had suggestions of something easy and safari compatible, or an easy fix for the current control that works otherwise I guess I'll have to learn the mechanics of this one: http://www.asp.net/CSSAdapters/Menu.aspx

    Thanks so much! 

  • 14 years ago
    hi, these controls are great to get you up and running quickly, but the html output isnt lean, the css adapters are not exactly straight forward either and can break controls that are not the standard asp web controls like anthem (anthemdotnet.com). Personally I prefer to put a literal control on the page then use a StringBuilder to create a <ul><li>eg</li></ul>. Then using a for loop or similar you can parse your xml document or IDataReader and create the <li>eg</li> items. Then set the text property of your literal control to the StringBuilder content. Its just an option. After this you can create your own css rules, implement javascript or pure css dropdowns and style it how you like.

    something like

    StringBuilder sb = new StringBuilder();
    sb = sb.AppendFormat("<ul>");
    foreach(condition to match here)
    {
    sb = sb.AppendFormat("<li><a href={0}>{1}</a></li>", ResolveUrl("~/example.aspx"), linkText);
    }
    sb = sb.AppendFormat("</ul>");
    literal.Text = sb.ToString();

    Granted, you have to do a little more than attach a datasource and set the properties, but you can exercise more control over your html.














  • 14 years ago
    try www.dynamicdriver.com

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The difference between theory and practice is smaller in theory than in practice.”