ASP.NET 4.0 website works fine in IE9. But javascript and alignment issue in IE11


Nov 17, 2014
Programming Experience

I am working on a ASP.NET website which is being developed using Visual studio 2010. Target framework is 4.0.

Website is hosted on windows 2003 machine running IIS 6.

website works fine in IE9 and chrome. But some javascript functions does not work fine when I access the website using IE11.

I also see some alignment issues when I access the website using IE11.

I added the below line above head secion of every page and the alignment issues is resolved. But the Javascript functions still does not work as it works in IE9. I am using a javascript function to check/uncheck all rows in a gridview when the header checkbox is checked/unchecked. It works fine in IE9 and chrome but in IE11, it does not select/deselect the checkbox in the first row of the grid view.

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

Why the web page does not render properly when accessed using IE11 when it works fine in IE9 and Chrome.

<asp:GridView ID="gdvData" Height="400px" HorizontalAlign="Center"
runat="server" HeaderStyle-BackColor="#33CCFF" HeaderStyle-CssClass="FixedHeader"
AutoGenerateColumns="false" AlternatingRowStyle-BackColor="WhiteSmoke"
style="height:200px; width:700px; overflow:auto;">

<asp:TemplateField HeaderText="Select Column"
HeaderStyle-Width="45px" ItemStyle-Width="45px">

<asp:CheckBox ID="chkboxSelectAll" Checked="false" runat="server" onclick="CheckUnCheckAllRows(this)" ></asp:CheckBox>
<asp:CheckBox ID="chkSelectRow" runat="server" Checked="false" Text=""> </asp:CheckBox>


<script type="text/javascript" language="javascript">

function CheckUnCheckAllRows(CheckboxHeader)
var GridVwHeaderChckbox = document.getElementById("<%=gdvData.ClientID %>");

for (i = 1; i < GridVwHeaderChckbox.rows.length; i++) {
GridVwHeaderChckbox.rows.cells[0].children[0].checked = CheckboxHeader.checked;



What changes are required to make the javascript functions work in IE11 as they work in IE9?

Top Bottom