After yesterday's post on Panel Weirdness some questions from Milan Negovan prompted me to write an article on how ASP.NET employes adaptive rendering. The HTML markup emitted from a Web control depends on the browser requesting the page.
Behind the scenes, the Page class creates an HtmlTextWriter instance based on the Browser object's TagWriter property. By default, the TagWriter property refers to HtmlTextWriter, which emits HTML 4.0-compliant HTML markup. For non-Microsoft browsers, the Html32TextWriter class is used instead, which emits HTML 3.2-compliant HTML. All of this information, thankfully, is configurable through the <browserCaps> section.
One issue that configuring the <browserCaps> section doesn't address is the validation controls and their client-side validation scripts. This, really, is another can of worms, as the System.Web.UI.WebControls.BaseValidator class annoyingly uses document.all to reference the client-side validator controls. (document.all is not supported in non-Microsoft browsers.) The short of it is that you have to create your own set of validation controls, such as Paul Glavich's DomValidators, which starts from scratch with the creation of a BaseValidator class that uses document.getElementById() instead.
Read the article, A Look at ASP.NET's Adaptive Rendering