Page view counter

Safari browser and asp:menu

Rate It (1)

Last post 05-03-2009 9:03 AM by tcblues. 54 replies.

Sort Posts:

  • Re: Safari browser and asp:menu

    07-04-2007, 3:46 AM
    • Loading...
    • darwaish
    • Joined on 06-22-2007, 2:32 PM
    • Posts 24
    • Points 19

    This one worked for me.

    http://www.big-o.org/?p=20

  • Re: Safari browser and asp:menu

    08-12-2007, 11:35 AM
    • Loading...
    • lexx_Debug
    • Joined on 01-05-2006, 1:48 PM
    • JHB
    • Posts 10
    • Points 34

    thanks a million time bro!, that solved all my issues.

    cheers

    Albert
  • Re: Safari browser and asp:menu

    08-13-2007, 5:02 PM
    • Loading...
    • Rodashar
    • Joined on 07-25-2007, 9:46 PM
    • Calgary
    • Posts 129
    • Points 574

    Awesome man that works perfect.... now If I can just fix the white space between my images :P

    Remeber to mark as Answer if someone's answer helped you.
  • Re: Safari browser and asp:menu

    09-19-2007, 6:44 PM
    • Loading...
    • dazimmermann
    • Joined on 02-22-2006, 8:06 PM
    • Posts 2
    • Points 7

    Michaelvoo - This one gets written in ink in my "big book of tricks" for browser compatibility fixes.  That was an awesome find that just solved Mac display issues on four sites for me.  Thanks a googol!

     BTW, I tested for the Safari 1.3 crash problem you described, but using Safari 3.0.3, and it doesn't seem to be a problem any longer.  Static and dynamic menus dropped down on a horizontal menu, and on a different site the vertical .NET menu rendered just as well without a problem.

  • Re: Safari browser and asp:menu

    10-01-2007, 2:10 AM
    • Loading...
    • ejstembler
    • Joined on 02-06-2003, 9:14 AM
    • Tampa, Florida
    • Posts 29
    • Points 102

    Personally, changing the ClientTarget to "uplevel" is not a good fix for me.

    The ASP.Net menu control renders correctly on Safari; however, I noticed that HttpBrowserCapabilities now thinks the browser is IE5.

    I have an "AlphaImage" control I'm using to display all of my alpha–transparent PNG images. If the control detects IE5 it dynamically swaps out the img reference for a div with an IE–only filter at runtime.

    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.png');

    Of course, since Safari does not support Microsoft's proprietary filters the PNGs do not show up.

  • Re: Safari browser and asp:menu

    10-17-2007, 5:40 AM
    • Loading...
    • nandhucbm
    • Joined on 09-27-2005, 7:19 AM
    • Chennai
    • Posts 57
    • Points 21

    craigbtx:

    You could also put it in the preint event...

      Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
            If InStr(Request.ServerVariables("http_user_agent"), "Safari") Then
                Page.ClientTarget = "uplevel"
            End If
        End Sub

     Thanks craigbtx.

    It is working fine for me.

     

     

    Nanda kumar R | eMantras | Programmer
  • Re: Safari browser and asp:menu

    01-14-2008, 8:02 AM

     Thanks, michielvoo.... Adding the safari.browser file to the App_Browsers folder with this is what solved my problem.

    ------------------------------------------------------------------------------------------

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

    ------------------------------------------------------------------------------

     Also for those who are using a StaticPopOutImageUrl and are experiencing a Spacing issue with Firefox and Safari, use a CssClass for the StaticMenuItemStyle for padding (Don't use the StaticMenuItemStyle's HorizontalPadding property)

    <StaticMenuItemStyle CssClass="staticMenuItem" />

    ---------------------------------------------------------------------------

  • Re: Safari browser and asp:menu

    02-15-2008, 6:49 AM
    • Loading...
    • SimonRigby
    • Joined on 10-24-2006, 10:25 AM
    • Posts 55
    • Points 87

    michielvoo:

    <browsers>
    <browser refID="safari1plus">
    <controlAdapters>
    <adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
    </controlAdapters>
    </browser>
    </browsers>
     Good fix for me. Certainly better than forcing the browser "up level". Three sites, same issue, same fix .. all work now. Love ya work :)
  • Re: Safari browser and asp:menu

    02-15-2008, 10:44 AM
    • Loading...
    • craigbtx
    • Joined on 10-01-2004, 4:50 PM
    • Posts 622
    • Points 1,557

    I'll have to try this, looks simple.

    But we had more problems than just menus so using the uplevel settings as shown below fixed ALL issues. Never any more complaints.

      Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
                           
            'Test for Safari or any other browser that is not recognized properly by ASP.NET 2.0

            If InStrRequest.ServerVariables("http_user_agent"), "Safari") > 0 Then
                Session("SetToUpLevelBrowser") = True
            Else
               Session("SetToUpLevelBrowser") = False
            End If

        End Sub


    In every page put......

      Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
                If Session("SetToUpLevelBrowser") Then
                   Page.ClientTarget = "uplevel"
                End If
        End Sub

  • Re: Safari browser and asp:menu

    04-15-2008, 9:12 PM
    • Loading...
    • soros
    • Joined on 04-16-2008, 1:11 AM
    • Posts 1
    • Points 2
    Worked perfectly! I know this thread is old, but the solution is becoming more necessary with the abundance of iPhones out there. Thanks Michielvoo.
  • Re: Safari browser and asp:menu

    04-17-2008, 7:22 AM
    • Loading...
    • dotnet333
    • Joined on 08-28-2007, 3:11 PM
    • Mumbai
    • Posts 40
    • Points 69

    Step1: Add App_Browser Folder in application

              right click on project add ASP.Net Folder - App_Browser

              right click on  App_Browser -- Add new item  --- Browser File  ( with name Safari.browser )

             Add this section in Safari.browser file and save the file.

    <browser refID="safari1plus">

    <capabilities>

    <capability name="xml" value="true" />

    </capabilities>

    <controlAdapters>

    <adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />

    </controlAdapters>

    </browser>

    </browsers>

    And Try now your application..

    ~    Please Mark as Answer -If it makes you helpful ~        

    http://abhijeetkhake.blogspot.com

     

     

  • Re: Safari browser and asp:menu

    04-17-2008, 9:53 AM
    • Loading...
    • craigbtx
    • Joined on 10-01-2004, 4:50 PM
    • Posts 622
    • Points 1,557

    I have not verified this but......

    THERE'S ONE CATCH. See below.

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

    THERE'S ONE CATCH. Safari will crash when the browser window is too small to contain all the items in the menu and you hover over then out of the menu. I can not confirm this is true for Safari in general, but I have consistently seen this behavior on a Mac with OS X 10.3 and Safari 1.3, so be sure to test this case. This might be the reason that Microsoft decided to render an alternative menu for Safari.

    Basically the refID matches a browser id in the original browser configuration files for the .Net framework. In our custom .browser file we override the control adapter settings for the asp:menu control for this specific browser.


     Also for those who are using a StaticPopOutImageUrl and are experiencing a Spacing issue with Firefox and Safari, use a CssClass for the StaticMenuItemStyle for padding (Don't use the StaticMenuItemStyle's HorizontalPadding property)

    <StaticMenuItemStyle CssClass="staticMenuItem" />

  • Re: Safari browser and asp:menu

    05-22-2008, 10:33 AM
    • Loading...
    • brotherned
    • Joined on 04-25-2008, 10:49 PM
    • Posts 2
    • Points 4

    Check out this link. http://hirentechie.wordpress.com/2008/05/16/aspnet-menu-control-in-mac-safari-browser/

     
    I have my menu in a user control.  I put this in the Page_Load of the user control and it works in Safari.   

     
    if (Request.UserAgent.IndexOf("AppleWebKit") > 0)
            {
                Request.Browser.Adapters.Clear();
            }

  • Re: Safari browser and asp:menu

    05-22-2008, 4:34 PM
    • Loading...
    • kbeeveer46
    • Joined on 05-13-2007, 9:01 PM
    • Posts 22
    • Points 10
    michielvoo:

     Hello,

    maybe I can help you all with this issue as well. What I did to enable the asp:menu for Safari was to add a file called safari.browser to the App_Browsers folder. The contents of safari.browser are as follows:  

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

    Basically the refID matches a browser id in the original browser configuration files for the .Net framework. In our custom .browser file we override the control adapter settings for the asp:menu control for this specific browser.

    There's one catch. Safari will crash when the browser window is too small to contain all the items in the menu and you hover over then out of the menu. I can not confirm this is true for Safari in general, but I have consistently seen this behavior on a Mac with OS X 10.3 and Safari 1.3, so be sure to test this case. This might be the reason that Microsoft decided to render an alternative menu for Safari.

    Let me know how this works out for you, I'd appreciate any feedback on this solution. Thanks! 

    I just wanted to let you know (even though this is a very old thread) that you saved me so much time. Your solution fixed my problem perfectly. I had the same problem as the OP. There's tons of functionality in the .browser files that I wish I knew from day one. They have fixed so many of my Safari issues.
  • Re: Safari browser and asp:menu

    08-26-2008, 4:48 PM
    • Loading...
    • mfrimu
    • Joined on 01-01-2007, 2:12 AM
    • Posts 12
    • Points 28

    works for me (App_Browsers) safari.browser

Page 3 of 4 (55 items) < Previous 1 2 3 4 Next >