An iMIS Tips and Tricks by Venketesh Subramony
Consultant, BroadPoint Technologies
Please add this in Master Page
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
protected override void AddedControl(Control control, int index)
{
if (Request.ServerVariables["http_user_agent"].IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) != -1)
{
this.Page.ClientTarget = "uplevel";
}
base.AddedControl(control, index);
}
Also use the Browsercap in webconfig
<system.web>
<browserCaps>
<!-- GECKO Based Browsers (Netscape 6+, Mozilla/Firefox, ...) //-->
<case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+)(?'VendorProductToken' (?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)))?">
browser=Gecko
<filter>
<case match="(Gecko/[-\d]+)(?'VendorProductToken' (?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)))">
type=${type}
</case>
<case> <!-- plain Mozilla if no VendorProductToken found -->
type=Mozilla
</case>
</filter>
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="rv:(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
version=${version}
majorversion=0${major}
minorversion=0${minor}
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>
<!-- AppleWebKit Based Browsers (Safari...) //-->
<case match="AppleWebKit/(?'version'(?'major'\d?)(?'minor'\d{2})(?'letters'\w*)?)">
browser=AppleWebKit
version=${version}
majorversion=0${major}
minorversion=0.${minor}
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="AppleWebKit/(?'version'(?'major'\d)(?'minor'\d+)(?'letters'\w*))(.* )?(?'type'[^/\d]*)/.*( |$)">
type=${type}
</case>
</case>
<!-- Konqueror //-->
<case match=".+[K|k]onqueror/(?'version'(?'major'\d+)(?'minor'(\.[\d])*)(?'letters'[^;]*));\s+(?'platform'[^;\)]*)(;|\))">
browser=Konqueror
version=${version}
majorversion=0${major}
minorversion=0${minor}
platform=${platform}
type=Konqueror
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
</case>
<!-- Opera //-->
<case match="Opera[ /](?'version'(?'major'\d+)(?'minor'\.(?'minorint'\d+))(?'letters'\w*))">
<filter match="[7-9]" with="${major}">
tagwriter=System.Web.UI.HtmlTextWriter
</filter>
<filter>
<case match="7" with="${major}">
<filter>
<case match="[5-9]" with="${minorint}">
ecmascriptversion=1.5
</case>
<case>
ecmascriptversion=1.4
</case>
</filter>
</case>
<case match="[8-9]" with="${major}">
ecmascriptversion=1.5
</case>
</filter>
</case>
<case match="Chrome/(?'version'(?'major'\d+)(?'minor'\.\d+)\.\d+.\d+)\sSafari/\d+\.\d+">
browser=Chrome
version=${version}
majorversion=${major}
minorversion=${minor}
</case>
</browserCaps>
<system.web>
No comments:
Post a Comment