I created a website in Visual Studio 2005 Pro. For browsers that accept xhtml (e.g. firefox), it sends the appropriate MIME type for it to be parsed properly.
This requires script blocks to be in the form:
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];
...
function __doPostBack(eventTarget, eventArgument) {
...
}
//]]>
</script>
This worked on VS 2005 but when I published the website and put it on a WS 2003 server running IIS 6 and ASP.net 2.0, it starts using:
<script type="text/javascript">
<!--
var theForm = document.forms['aspnetForm'];
...
function __doPostBack(eventTarget, eventArgument) {
...
}
// -->
</script>
When it uses this, it does not work and post back links subsequently cannot find the __doPostBack function.
How can I make it use CDATA blocks?
...
Go to the complete details ...