J
Jay
ASP.NET 2.0.
One line of code (checkbox onclick) in a databound grid really slows down
the page load...
<asp:TemplateColumn>
<ItemTemplate>
<asp:CheckBox ID="chkEmp" onClick=<%# "HighlightRow(this, """ +
Eval("empname") + """)"%> runat="server" autopostback="False"/>
</ItemTemplate>
</asp:TemplateColumn>
If I remove the """ + Eval("employee_name") + """ part from the line
everything works great. Any ideas? Even the HighlightRow javascript
function is simple...
<script language="javascript">
<!--
function HighlightRow(chkB, empname)
{
xState=chkB.checked;
if(xState)
{
chkB.parentElement.parentElement.style.backgroundColor='yellow';
}
else
{
chkB.parentElement.parentElement.style.backgroundColor='whitesmoke';
}
}
-->
</script>
You may notice that the empname var is not eve used (yet) in the javascript.
Anyways, why would this take soo long for the page to load with the onclick
in place?
Thanks.
One line of code (checkbox onclick) in a databound grid really slows down
the page load...
<asp:TemplateColumn>
<ItemTemplate>
<asp:CheckBox ID="chkEmp" onClick=<%# "HighlightRow(this, """ +
Eval("empname") + """)"%> runat="server" autopostback="False"/>
</ItemTemplate>
</asp:TemplateColumn>
If I remove the """ + Eval("employee_name") + """ part from the line
everything works great. Any ideas? Even the HighlightRow javascript
function is simple...
<script language="javascript">
<!--
function HighlightRow(chkB, empname)
{
xState=chkB.checked;
if(xState)
{
chkB.parentElement.parentElement.style.backgroundColor='yellow';
}
else
{
chkB.parentElement.parentElement.style.backgroundColor='whitesmoke';
}
}
-->
</script>
You may notice that the empname var is not eve used (yet) in the javascript.
Anyways, why would this take soo long for the page to load with the onclick
in place?
Thanks.