It has been indeed a long story of browser wars and browser compatibility and Webmasters have always been constantly having their fingers crossed to keep their websites/web applications as compatible as far as possible amongst the major browsers. With the advent of ASP.NET, making the web pages compatible with at least the major browsers has been made a bit easier and a pleasant thing to work with.
With all validator controls and other major parts of a webpage are now made as Server Controls, the Web Server now takes the responsibility of rendering the pages that is optimal to the client browser. While Validator controls deliver rich client side validations for an up level browser like MSIE 5.5 or higher, with older browsers, the page automatically posts back to the Server but of course, Server Side Processing Scripts are deferred from executing till the Page.IsValid is true. This greatly eliminates the need of redundant client side validation for each browser.
Rejuvenating the page content
However, with high traffic portal applications, the Webmaster might be concerned with delivering the best browsing experience and a page that best renders on each type of browsers, rather than depending upon the automatic down leveling strategy adopted by ASP.NET with its Server-Centric trick. ASP.NET Comes to our rescue in detecting the browser and its abilities with is Request.Browser property
Browser Detection Strategies
The code below shows a brief browser detection using Request.Browser:
I hope the above article would be greatly useful to developers involved in delivering ASP.NET Web Portal applications and to webmasters in making their web portals/applications best render with different types of web browsers, making the best use of the support that ASP.NET offers towards browser compatibility.