How to render up-level html to FireFox from ASP.NET 1.1 – level 200

Out of the box, ASP.NET 1.1 doesn’t recognize FireFox, but FireFox is
now probably the second most popular browser behind IE.  IE still
has the market, and if you are just checking IE, you probably won’t
feel any pain, but when developing an app for the Internet, you should
make sure that your site works and looks good in the popular
browsers. 

Since ASP.NET 1.1 doesn’t recognize FireFox, the built-in WebControls
will render down-level html.  What that means is that every
<div/> tag will be replaced by a single-cell table, and a host of
other changes.  This isn’t good because it will distort the layout
of your page.

The good news is that ASP.NET 1.1 can easily be told of the
capabilities of other browsers through the web.config file.  You
can customize the regular expression used to evaluate the User Agent
string, but if you quickly need to support FireFox as well as IE, paste
the following into your web.config within the <system.web/> node:

    <browserCaps>
            <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>
        </browserCaps>