0

I need to detect which standards mode is being used by IE.

I have checked and I can see that the standards mode is different from compatibility mode as it does not seem to change the user agent string at all (where compatibility mode changes the MIME type).

The reason for this is I am using the WinForms web browser control which sets the documents standards mode to IE7 no matter what browser you are using and I cannot add the registry hack to change this.

Does anyone know of a way to obtain the standards mode being enforced from the client or if it is even possible?

Joris Van Regemortel
  • 935
  • 1
  • 10
  • 34
Edmund G
  • 545
  • 1
  • 5
  • 9
  • have you tried documentMode property? or compatmode? look those up on msdn – albert Jun 25 '13 at 14:31
  • documentMode looks like it should give me the information I need but is there not equivalent in the code behind as I am trying to include or exclude a css file. – Edmund G Jun 25 '13 at 15:02
  • I have taken a look and realised I can do this using JQuery http://stackoverflow.com/questions/574944/how-to-load-up-css-files-using-javascript. Thank you for your help – Edmund G Jun 25 '13 at 15:08

1 Answers1

0

This can only be performed via JavaScript as IE now uses the shorter link in the code behind. Details on this fix can be found here: How to load up CSS files using Javascript?

Community
  • 1
  • 1
Edmund G
  • 545
  • 1
  • 5
  • 9