Hi:
I'm doing a web page using asp.net and framework 1.1. When I upload the
page to server and try it with html validator of w3c, trying with html 4.01
an xhtml 1.0, I receive an error in the script definition of __doPostBack
method because de element type is not defined. This script is automatically
generated by the compiler or by the server.
I used the same page into an IIS over windows XP and generates correct
code (script with element type). The problem becomes when I use the page
into an IIS over windows 2003, the script generated in that case not
includes the element type. The framework of both versions are the same:
1.1.4322.
Is there any way to configure this definition?
It must be:
<script language="javascript" type="text/javascript">
---------------------
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("m icrosoft") > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
and IIS on Windows 2003 generates:
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("n etscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
Lot of thanks
Alfonso Alvarez Pérez