// you can just replace the old method with this one.
public bool CheckBrowserCompatibility()
{
System.Web.HttpBrowserCapabilities oBrowser = Page.Request.Browser ;
// Internet Explorer 5.5+ for Windows
if (oBrowser.Browser == "IE" && ( oBrowser.MajorVersion >= 6 || ( oBrowser.MajorVersion == 5 && oBrowser.MinorVersion >= 0.5 ) ) && oBrowser.Win32) {
return true ;
}
// Safari - this is the new line to add
else if (oBrowser.Browser.Contains("Safari"))
{
return true;
}
else
{
Match oMatch = Regex.Match( this.Page.Request.UserAgent, @"(?<=Gecko/)\d{8}" ) ;
return ( oMatch.Success && int.Parse( oMatch.Value, CultureInfo.InvariantCulture ) >= 20030210 ) ;
}
}
Fri, 10/19/2007 - 21:21
#1

Re: Fixing ASP.NET DLL for Safari Browser
Re: Fixing ASP.NET DLL for Safari Browser
Re: Fixing ASP.NET DLL for Safari Browser
And don't forget to check the version number. Old versions won't work very nice...
Re: Fixing ASP.NET DLL for Safari Browser
-Randy