1

I have currently run into an issue updating an old Website that leverages an Infragistics Menu control in a UserControl throughout the site. The dropdown menus of the Infragistics control do not render correctly in IE9 unless the page is being rendered in Quirks mode. Quirks mode in IE9 is causing havoc with a large amount of javascript and other user controls.

Is it possible to have the UserControl that contains the Infragistics control render in a DOCTYPE that allows Quirks mode and then render the rest of the page in Strict?

I have looked at possibly using adaptercontrols to try to control this behavior but I have only found a way to control the overall page through the following link. http://wiki.visualwebgui.com/pages/index.php/ASP.NET_Wrapper_-_Custom_DOCTYPE_for_a_wrapped_control

This implementation controls the DOCTYPE for the entire page though and not a specific UserControl which is what I need.

Has anyone else ran into a situation where they needed portions of pages rendered in different DOCTYPEs?

Ben
  • 13
  • 4
  • 2
    You can only have one DOCTYPE for each page. You can't render it partially with one and other part with a new one. Do you have the option to update to a newer version of that control? I had something similar with ReportViewer and it did the trick. – Vitor Canova Apr 16 '14 at 15:27
  • 3
    Like @VitorCanova said, you can only use one DOCTYPE. If you are really dependent on a second one maybe you could use an iframe inline and set a different DOCTYPE there. – Horen Apr 16 '14 at 15:30
  • Thank you \ for your comments. I am pushing my employer to update to the most current version of Infragistics and based on your comment and Joao Answer I am going to look more deeply into the possibility of using an iframe. – Ben Apr 16 '14 at 17:52
  • @Horen I don't know it IE will really respect different DOCTYPEs even in iFrame. Are yousure? I'm now curious. – Vitor Canova Apr 16 '14 at 19:03
  • While I haven't overcome my issue yet, I was able to get a page to load as Strict mode while an iframe loaded in Quirks mode. I was able to determine this using the following javascript $(document).ready(function() { var compMode = (document.compatMode == "BackCompat") ? "Quirks" : "Strict"; alert("MenuIFrame is rendered in " + compMode + " mode."); }); My menu dropdowns unfortunately are still populating in the wrong place within the iframe. Not sure why yet. It could be because the Quirks mode is just being emulated? – Ben Apr 16 '14 at 19:37

1 Answers1

1

Plain simple --> No.

Alternative, use an iframe for a page with that control only, and pass values to parent document through javascript using document.parent, this is the best that can be done, for that odd and specific dilema you are facing.

This link will help you with the iframe trick: How to force Iframe to run quirks under a standard parent frame.

Community
  • 1
  • 1
João Pinho
  • 3,725
  • 1
  • 19
  • 29