Dmitry
Dmitry

Reputation: 31

ie9 iframe xml problem

I have a problem with showing xml in IE9 in iframe which is located with another content on the page. So, I have such iframe on the page:

<iframe  id="idIframe" src="/showXml.aspx?ID=xxxx"></iframe>

showXml.aspx:

  string xml = HttpUtility.HtmlDecode("someXML");
  Response.Clear();
  Response.ContentType = "text/xml";
  Response.Write(xml);
  Response.End();

When page is displayed - content of iframe is blank. However, if the link for xml is opened directly in browser - everything is ok and XML is shown.

It works in IE7,IE8 and all other browsers. So, is it a bug of IE9 or that is me who is doing smth wrong?

Upvotes: 3

Views: 3587

Answers (1)

John
John

Reputation: 392

I am having a similar issue, this may help but it may not. It did not fix anything for me, but it has for others so check it out.

One workaround is available. It's not a very satisfying long-term solution, but if it works it works I guess. Plant this in the section of the parent page as the first META tag if you have multiple:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

IE9 forces children to have the same doctype tag as the parent now.

Hope that helps!

Upvotes: 2

Related Questions