views:

335

answers:

3

How do I disable downlevel rendering of my ASP.NET 2.0 site?

I have a single master-page that all the other pages inherit from, and do not want "downlevel"-versions of the server-controls to be sendt to Google and W3C-validators. The best thing would be if this feature could be disabled for all users on all pages on my site.

A: 

There's a native component and some config possibilities for this.

Googling "browser capabilities" or "browsercaps" throws up some good links, but here's a couple of solid ones from MSDN.

annakata
Thank you for your answer. I was trying to find a way to disable this autodetect-feature all together, the site will not be accessible to users without (X)HTML 4.01 anyway.
Espo
I personally go with the config file solution when I do use asp.net controls even though it's deprecated, because the whole instance level ClientTarget even on masterpages seems like pain. Global solutions ftw
annakata
+2  A: 

There are a number of ways to do this.

At the page level (either declaratively or in code) you can use the ClientTarget property of the page:

ClientTarget="Uplevel" // Will force to IE6 capabilities.

Alternatively as Annakata's just posted, using a browser caps setting

Zhaph - Ben Duguid
This works great, thank you!
Espo
A: 

While glancing over the SO frontpage, I read this question as "How do I disembowel..."

I think I need to take a deep breath and get off this bug for a while...

Michael Borgwardt