问题
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.
回答1:
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
回答2:
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.
ASP.NET Web Server Controls and Browser Capabilities
browserCaps Element (ASP.NET Settings Schema)
来源:https://stackoverflow.com/questions/457399/how-do-i-disable-downlevel-rendering-in-asp-net