Thursday, February 4, 2016

Render page in different IE version mode

IE 11 has the edge mode set as default rendering engine. Going forward, IE 11 seems to be breaking away with some of the backward-compatible.

I have run into issues with RDLC reports. The letterhead logos are embedded into the report files. They would only appear normally when rendered in IE 9 or 10 mode. A vertical line appears instead when the report is rendered in IE 5, 7, 8 and Edge-mode.

In order to have IE 11 to render the images on the page that contains RDLC report, we can use meta tag as follows to force IE to select a desired version.

<configuration> 
  ...
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <add name="X-UA-Compatible" value="IE=edge" />
        <!-- To force IE to render in edge mode. IE=9, IE=10, etc can be used, too. -->
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

No comments: