HTTP handlers are generally used for download a file, show an image, or even to show a report (ie.. generated as html at runtime and stream it through)
Now consider your html report was generated and now all you need to do is show through your website using ASP.NET http handler. Opening the report html just show all the formatting properly but via http handler some of styles were not correctly applied.
To resolve this you have got 2 options
- Modify your CSS to render it properly
- Force your handler to render in compatibility mode
In order to force your handler to render in compatibility mode all you need is to just add a header
for eg you can force usage of IE8
or use microsoft standard. Refer to microsoft article "Specifying legacy document modes"
Be nice to nerds. Chances are you'll end up working for one.
Bill Gates, Microsoft
Now consider your html report was generated and now all you need to do is show through your website using ASP.NET http handler. Opening the report html just show all the formatting properly but via http handler some of styles were not correctly applied.
To resolve this you have got 2 options
- Modify your CSS to render it properly
- Force your handler to render in compatibility mode
In order to force your handler to render in compatibility mode all you need is to just add a header
for eg you can force usage of IE8
Response.AddHeader("X-UA-Compatible", "IE=EmulateIE8");
or use microsoft standard. Refer to microsoft article "Specifying legacy document modes"
Response.AddHeader("X-UA-Compatible", "IE=edge");
Be nice to nerds. Chances are you'll end up working for one.
Bill Gates, Microsoft