[DevExpress Support Team: CLONED FROM KA18646: How to adjust DevExpress ASP.NET controls when opening a page in the Internet Explorer Compatibility Mode]
I'm still confused what this actually *does*. The documentation says "switch all DevExpress ASP.NET controls on the specified page to use the specified IE version (i.e. inform them on the server side to prepare corresponding HTML rendering)." And yet, when I throw an aspxgridview on a page and call DevExpress.Web.ASPxClasses.ASPxWebControl.SetIECompatibilityModeEdge, the rendered HTML is different when I set compatibility mode in the browser. What I *thought* it would do is send the same HTML to IE 9, regardless of what Browser Mode it is in. Does this method NOT do that? If it doesn't, how *can* I tell the controls to render for the "real" version of IE? The problem of course is, if I have this: <meta http-equiv="X-UA-Compatible" content="IE=edge" /> on my page, then the document mode is REAL IE 10 (let's say), but the DevEx controls are sending HTML that is correct for IE7 *NOT* IE 10.
We have closed this ticket because another page addresses its subject:
How to adjust DevExpress ASP.NET controls when opening a page in the Internet Explorer Compatibility ModeHow to use SetIECompatibilityModeEdge method
Answers approved by DevExpress Support
Hello,
>>What I *thought* it would do is send the same HTML to IE 9, regardless of what Browser Mode it is in.
If a site/page is configured to display content in a Compatibility Mode (and the actual Document Mode is less than the major browser version), it is necessary to render the corresponding HTML content and use the corresponding DOM API.
>>Then the document mode is REAL IE 10 (let's say), but the DevEx controls are sending HTML that is correct for IE7 *NOT* IE 10.
If this does not work for you, please provide us with a sample running project and illustrate actual/expected results with some screenshots.
Well, I'm not talking about IE 7. I am talking about IE 9 in ***Compatibility Mode***, which makes the *Browser Mode* IE 7. Please see: http://blogs.msdn.com/b/ie/archive/2010/10/19/testing-sites-with-browser-mode-vs-doc-mode.aspx.
"The Browser Mode determines
User-Agent (UA) string that IE sends to servers
Document Mode IE defaults to
Conditional Comments that IE evaluates"
"IE9 Compatibility View
IE9 reports a UA string, version vector, and document mode, as if it is IE7; however, the UA string also includes the Trident/5.0 token indicating that the browser is really IE9. Use this mode to test how IE9 users experience your site if they click on the Compatibility View button."
Does my question make sense now?
Sorry, guys. My bad. It *is* working as expected. I was switching my Browser To IE 7 Mode, not "IE 9 Compat View" I assumed that both versions would send the Trident header in the user agent string. Turns out that that's not the case. You have to actually be in "Compat View" for it to send the Trident header. Didn't realize that. So this *is* working exactly as I hoped it would. Thanks!