Wednesday, March 28, 2012

Why Microsoft Examples generate error on IIS with .net 1.1: Issue with Validator Control

Hello:
I used the code in the first example from:
http://support.microsoft.com/defaul...kb;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
TerryWhat HTML is being sent back to the browser?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

"Support" <RemoveThis_Support@.mail.oci.state.ga.us> wrote in message
news:ermwKwrAEHA.2480@.TK2MSFTNGP12.phx.gbl...
> Hello:
> I used the code in the first example from:
> http://support.microsoft.com/defaul...kb;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
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+FAU8awA8fH42Zj9JvvtQNIY51lE=" /
<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="RequiredFieldValidatorEvaluateIsValid" initialvalue=""
style="color:Red;width:100%;visibility:hidden;">First 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="RequiredFieldValidatorEvaluateIsValid" initialvalue=""
style="color:Red;width:100%;visibility:hidden;">Age 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="RequiredFieldValidatorEvaluateIsValid" initialvalue=""
style="color:Red;width:100%;visibility:hidden;">Height 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;">Incorrect
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" <RemoveThis_Support@.mail.oci.state.ga.us> wrote in message
news:ermwKwrAEHA.2480@.TK2MSFTNGP12.phx.gbl...
> Hello:
> I used the code in the first example from:
> http://support.microsoft.com/defaul...kb;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
Hrm... this HTML works just fine on my server. Have you tried accessing this
from a different machine?

Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

"Support" <RemoveThis_Support@.mail.oci.state.ga.us> wrote in message
news:OblThXvAEHA.328@.TK2MSFTNGP10.phx.gbl...
> 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+FAU8awA8fH42Zj9JvvtQNIY51lE=" />
> <script language="javascript"
> src="http://pics.10026.com/?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="RequiredFieldValidatorEvaluateIsValid" initialvalue=""
> style="color:Red;width:100%;visibility:hidden;">First 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="RequiredFieldValidatorEvaluateIsValid" initialvalue=""
> style="color:Red;width:100%;visibility:hidden;">Age 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="RequiredFieldValidatorEvaluateIsValid" initialvalue=""
> style="color:Red;width:100%;visibility:hidden;">Height 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;">Incorrect
> 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" <RemoveThis_Support@.mail.oci.state.ga.us> wrote in message
> news:ermwKwrAEHA.2480@.TK2MSFTNGP12.phx.gbl...
> > Hello:
> > I used the code in the first example from:
> > http://support.microsoft.com/defaul...kb;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

0 comments:

Post a Comment