RequiredFieldValidators client-side script not functioning with Windows Server 2003

  • Thread starter Thread starter sadf
  • Start date Start date
S

sadf

We recently deployed several new ASP.NET apps to Windows Server 2003 and
discovered that field validator controls render client-side script that does
not execute!

Validation takes place on the server using Page.IsValid to branching
appropriately.

This appears to be a Server 2003 issue that occurs on several machines. The
behavior does not occur on Window2000 or XP.

What's the fix, please?

Thanks
 
Did you check that client-script mappings are OK in the app i.e it tries to
locate js files from correct location on aspnet_client folder?
 
Teemu,

It's more obscure that that because it is rendering the client-side script,
Below is important sample code from a page that is requiring the server
round-trip.

Obviously we're missing something simple. Do you see it?

Thanks.


<form name="Form1" method="post" action="TicketSales.aspx"
language="javascript" onsubmit="ValidatorOnSubmit();" id="Form1">

<script language="javascript"
src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"></script>
<input name="txtName" type="text" id="txtName" style="width:186px;" />

<script language="javascript">
<!--
var Page_ValidationActive = false;
if (typeof(clientInformation) != "undefined" &&
clientInformation.appName.indexOf("Explorer") != -1) {
if ((typeof(Page_ValidationVer) != "undefined") && (Page_ValidationVer
== "125"))
ValidatorOnLoad();
}

function ValidatorOnSubmit() {
if (Page_ValidationActive) {
ValidatorCommonOnSubmit();
}
}
// -->
</script>
 
FYI, the resolution:

When deploying to websites with multiple domains (not virtual directories),
there must be an aspnet_client within the root of the domain.
 
I don't see the validator control in the page output. Is it not being
rendered or did you just leave it out of the code you posted?
 
Back
Top