Here it is:
----------------------------------------------------------------------------
----------------------
<html>
<body>
<form name="form1" method="post" action="test.aspx"
language="javascript" onsubmit="ValidatorOnSubmit();" id="form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwtOTQ3NjUyMzM3Ozs+FAU8awA8fH42Zj9JvvtQNIY 51lE=" />
<script language="javascript"
src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"></script>
<span id="lblName">First Name:</span>
<input name="txtName" type="text" id="txtName" />
<span id="RequiredFieldValidatorName"
controltovalidate="txtName" errormessage="First Name field is empty"
evaluationfunction="RequiredFieldValidatorEvaluate IsValid" initialvalue=""
style="color:Red;width:100%;visibility:hidden;">Fi rst Name field is
empty</span><br>
<span id="lblAge">Age:</span>
<input name="txtAge" type="text" id="txtAge" />
<span id="RequiredfieldvalidatorAge"
controltovalidate="txtAge" errormessage="Age field is empty"
evaluationfunction="RequiredFieldValidatorEvaluate IsValid" initialvalue=""
style="color:Red;width:100%;visibility:hidden;">Ag e field is
empty</span><br>
<span id="lblHeight">Height:</span>
<input name="txtHeight" type="text" id="txtHeight" />
<span id="RequiredfieldvalidatorHeight" controltovalidate="txtHeight"
errormessage="Height field is empty"
evaluationfunction="RequiredFieldValidatorEvaluate IsValid" initialvalue=""
style="color:Red;width:100%;visibility:hidden;">He ight field is empty</span>
<span id="RangeValidatorHeight" controltovalidate="txtHeight"
errormessage="Incorrect value for the height field" type="Integer"
evaluationfunction="RangeValidatorEvaluateIsValid" maximumvalue="10"
minimumvalue="1" style="color:Red;width:100%;visibility:hidden;">In correct
value for the height field</span><br>
<div id="valSum" headertext="Summary of Validation Errors:"
style="color:Red;font-family:verdana;font-size:12pt;display:none;">
</div><br>
<input type="submit" name="btnValidate" value="Validate"
onclick="if (typeof(Page_ClientValidate) == 'function')
Page_ClientValidate(); " language="javascript" id="btnValidate" />
<script language="javascript">
<!--
var Page_ValidationSummaries = new Array(document.all["valSum"]);
var Page_Validators = new
Array(document.all["RequiredFieldValidatorName"],
document.all["RequiredfieldvalidatorAge"],
document.all["RequiredfieldvalidatorHeight"],
document.all["RangeValidatorHeight"]);
// -->
</script>
<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>
</form>
</body>
</html>
----------------------------------------------------------------------------
-----------------------------
Straight from the web site....
Thank you
TErry
"Support" <Re****************@mail.oci.state.ga.us> wrote in message
news:er**************@TK2MSFTNGP12.phx.gbl...
Hello:
I used the code in the first example from:
http://support.microsoft.com/default...b;en-us;316712
I get an "error on the page" line 4 char 1 syntax error Code:0 test.aspx
The folder where it is running has the following as the default script for
aspx:
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_ isapi.dll
So, I am running .Net 1.1 on a win 2000 machine with IIS. I am using IE
version 6.0.2800.1106.xpsp2.030422-1633
It also has asp.net version 1.0 installed
What's wrong.
Apparently the error is generated by the validator code:
<asp:RequiredFieldValidator
id="RequiredfieldvalidatorHeight"
ControlToValidate="txtHeight"
ErrorMessage="Height field is empty"
Display="Static"
InitialValue="" Width="100%"
runat=server></asp:RequiredFieldValidator>
So, when I remove it, the error goes away.
Thanks for your help
Terry