Sunday, December 04, 2005

Gecko browsers and ASP.NET

ASP.NET has left me high and dry when I try to render web apps on a Gecko browser. I aint sure why this happens, but sometimes scrollbars appear on different parts of the browser, CSS styles appear to have taken a beating. I did a little googling on this and found out that it is not just ASP.NET but IIS also, which may be responsible for this.

The following modifications were suggested in the web.config file

< browserCaps >
< !--Gecko based browsers //-- >
< case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+)? (?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)).*" >
browser="Gecko"
type=${type}
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=${major}
minorversion=${minor}
<case match="^b" with="${letters}" >
beta=true
</case>
</case>
</case>
</browserCaps>

There was another suggestion to use the following in the @page directive
clienttarget="IE5"
    

No comments: