ASP.NET & AlternatingRowStyle & IE8

If you’re a ASP.NET developer like myself, you may or may not have noticed a few changes to your sites when viewed in Internet Explorer 8.

As an example I had a gridview which had a different background for alternating rows.

<AlternatingRowStyle CssClass="odd" /></code>

And my CSS was something like

.odd { background-image: url(../graphics/tealbg.gif); }

The Solution

The easy (and maybe a little messy) way to solve this is to force the page to use IE7 compatibility. You can do this by adding the following to your tag.

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

Note: The above meta tag MUST appear before any link tags (stylesheet includes for example)

No related posts.

Have a computer problem? Ask in our SUPPORT forum!

Receive Discounted Software

No bull. Want cheap discounts for common software products?
  • AntiVirus
  • Video editing tools
  • Web development tools
  • Registry Cleaners
  • Computer speed boosters!
Our editors get these products sent to us WEEKLY for review.

WE WANT TO PASS THESE DISCOUNTS ON TO YOU! (We honestly don't need them)

So whack your email in the box below and when we receive stuff we'll forward it to you! Its that simple.


One Response to “ASP.NET & AlternatingRowStyle & IE8”

  1. [...] ASP.NET & AlternatingRowStyle & IE8 « Jigsaw Boys [...]

Leave a Reply