Why might ASP.NET be putting JavaScript in HTML Comment blocks, not CDATA?
Posted
by d4nt
on Stack Overflow
See other posts from Stack Overflow
or by d4nt
Published on 2010-03-22T16:27:54Z
Indexed on
2010/03/22
16:31 UTC
Read the original article
Hit count: 240
We have an ASP.NET 2.0 WebForms app that uses MS Ajax 1.0. It's working fine on all our environments (dev, test, IE6 VMs etc.). However, at the customer site the client side validation is not happening.
We're currently trying to eliminate all the various factors and along the way we asked them to get their page source and send it to us, and we found something interesting.
In our environment, our page has ASP.NET javascript in CDATA blocks:
<script type="text/javascript">
//<![CDATA[
. . .
//]]>
</script>
In their environment, the same code looks like this:
<script type="text/javascript">
<!--
. . .
//-->
</script>
This may be a red herring, but I'd like to eliminate it as the cause of the validation issues.
Does anyone know whether specific configurations/patches/versions of ASP.NET will make it do this?
© Stack Overflow or respective owner