473,395 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Submit with validation problem

I have a simple login page that has two text boxes, two
requiredfieldvalidators, a couple of labels and a button. It has been
reduced down to almost nothing to troubleshoot the below problem.

Added to a project on development machine (Win XP Pro, IIS 5.1, CLR
1.1.4322), works fine.
Deployed to a shared web host (IIS 5.1, CLR 1.1.4322), works fine.

Added to different project on same development machine, works fine.
Deployed to 2nd shared host (IIS 6.0, CLR 1.1.4322), FORM DOES NOT SUBMIT!
Validators seem to be working as if I leave a textbox empty, the
validator(s) present the appropriate message and there is no message if
textboxes are filled in.

It seems to be a problem with the generated javascript.
I added "/aspnet_client/system_web/1_1_4322/WebUIValidation.js" to the
application root because I need to utilize functions in it.
This is the same for all instances.
I mention this because if I remove the js file, the form will submit
properly, but then my other pages that need it don't work.

Here is the generated page source (minus most of the html) from the host
where the page does NOT submit:
<body onload="document.frmLogin.txtUserName.focus();">
<form name="frmLogin" method="post" action="logina.aspx"
language="javascript" onsubmit="if (!ValidatorOnSubmit()) return false;"
id="frmLogin">

<script language="javascript"
src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"></script>

<script language="javascript">
<!--
var Page_Validators = new Array(document.all["RequiredFieldValidator1"],
document.all["RequiredFieldValidator2"]);
// -->
</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) {
return ValidatorCommonOnSubmit();
}
return true;
}
// -->
</script>
</form>
</body>

==================================================
Here is the generated page source (minus most of the html) from the host
(and my development machine) where the page DOES submit:

<body onload="document.frmLogin.txtUserName.focus();">
<form name="frmLogin" method="post" action="logina.aspx"
language="javascript" onsubmit="ValidatorOnSubmit();" id="frmLogin">

<script language="javascript"
src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"></script>
<script language="javascript">
<!--
var Page_Validators = new Array(document.all["RequiredFieldValidator1"],
document.all["RequiredFieldValidator2"]);
// -->
</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>
================================================== ==========

The differences I see are in the form's submit event and the function
ValidatorOnSubmit().

Does anyone understand what is going on?
How to solve?

TIA
--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us

Nov 18 '05 #1
4 1396
Hi Alphonse,

From your description, you have a simple page which contains two textboxes
and two RequiredFieldValidator
Control to validate textboxes, also a button to submit the page. This
worked well on the dev machine winxp pro
iis5 and also ok on a win2k server machine
but the page can't be submit on a w2k3 machine with IIS6. You also menioned
that you have manually copy the /aspnet_client (clienside scripts) folder
from the other mahcine to the w2k3 server machine, yes?

As for the WebUIValidation.js file under the /aspnet_client root folder ,
it contains the clientside scripts which is required for the ASP.NET
valication control's clientside validation. Also, this file together with
other ASP.NET required clientside resources under the /aspnet_client root
folder can be installed via the "aspnet_regiis.exe" tool.

We should use the
aspnet_regiis -c command
to install the clientside resources for asp.net rather copy from other
machines. For detailed info on the aspnet_regiis tool, you can view the
following referece in msdn:

#ASP.NET IIS Registration Tool (Aspnet_regiis.exe)
http://msdn.microsoft.com/library/en...ETIISRegistrat
ionToolAspnet_regiisexe.asp?frame=true

So I sugggest you remove the /aspnet_client folder you manually copyed from
other machines and when to the .net's installed folder
%SYSTEM%\Microsoft.NET\Framework\v1.1.4322\
in commandline
and execute the
aspnet_regiis -c command to reinstall the clienside resources and test
again.

If you have anything unclear or have any new findings, please feel free to
post here. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx


Nov 18 '05 #2
Steven,

Thanks for the reply.
If I read the article correctly, Aspnet_regiis.exe must be run from the
command line on the server.
This is not an option as it is a shared commercial host.

--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:tS**************@cpmsftngxa10.phx.gbl...
Hi Alphonse,

From your description, you have a simple page which contains two textboxes and two RequiredFieldValidator
Control to validate textboxes, also a button to submit the page. This
worked well on the dev machine winxp pro
iis5 and also ok on a win2k server machine
but the page can't be submit on a w2k3 machine with IIS6. You also menioned that you have manually copy the /aspnet_client (clienside scripts) folder
from the other mahcine to the w2k3 server machine, yes?

As for the WebUIValidation.js file under the /aspnet_client root folder ,
it contains the clientside scripts which is required for the ASP.NET
valication control's clientside validation. Also, this file together with
other ASP.NET required clientside resources under the /aspnet_client root
folder can be installed via the "aspnet_regiis.exe" tool.

We should use the
aspnet_regiis -c command
to install the clientside resources for asp.net rather copy from other
machines. For detailed info on the aspnet_regiis tool, you can view the
following referece in msdn:

#ASP.NET IIS Registration Tool (Aspnet_regiis.exe)
http://msdn.microsoft.com/library/en...ETIISRegistrat ionToolAspnet_regiisexe.asp?frame=true

So I sugggest you remove the /aspnet_client folder you manually copyed from other machines and when to the .net's installed folder
%SYSTEM%\Microsoft.NET\Framework\v1.1.4322\
in commandline
and execute the
aspnet_regiis -c command to reinstall the clienside resources and test
again.

If you have anything unclear or have any new findings, please feel free to
post here. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #3
Fixed it!

Finally got a friendly tech support person and he installed the client
script files and all works now.

--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:tS**************@cpmsftngxa10.phx.gbl...
Hi Alphonse,

From your description, you have a simple page which contains two textboxes and two RequiredFieldValidator
Control to validate textboxes, also a button to submit the page. This
worked well on the dev machine winxp pro
iis5 and also ok on a win2k server machine
but the page can't be submit on a w2k3 machine with IIS6. You also menioned that you have manually copy the /aspnet_client (clienside scripts) folder
from the other mahcine to the w2k3 server machine, yes?

As for the WebUIValidation.js file under the /aspnet_client root folder ,
it contains the clientside scripts which is required for the ASP.NET
valication control's clientside validation. Also, this file together with
other ASP.NET required clientside resources under the /aspnet_client root
folder can be installed via the "aspnet_regiis.exe" tool.

We should use the
aspnet_regiis -c command
to install the clientside resources for asp.net rather copy from other
machines. For detailed info on the aspnet_regiis tool, you can view the
following referece in msdn:

#ASP.NET IIS Registration Tool (Aspnet_regiis.exe)
http://msdn.microsoft.com/library/en...ETIISRegistrat ionToolAspnet_regiisexe.asp?frame=true

So I sugggest you remove the /aspnet_client folder you manually copyed from other machines and when to the .net's installed folder
%SYSTEM%\Microsoft.NET\Framework\v1.1.4322\
in commandline
and execute the
aspnet_regiis -c command to reinstall the clienside resources and test
again.

If you have anything unclear or have any new findings, please feel free to
post here. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4
Hi Alphonse,

Really glad to hear that the problem been fixed! Have a good day!

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: CJM | last post by:
Can somebody clarify if/how/when a simple form is submitted when the <Enter> key is pressed? As I understood it, if you have a form with a single submit button, if enter is pressed, the form...
3
by: Arun K | last post by:
Hi, I am creating a simple .aspx page to add some fields with validation. I have used different .NET validations like REquiredFieldValidator, RegularExpressionValidator and showed the summary...
5
by: | last post by:
Hi all, Has anyone been able to write some custom javascript on the onclick event of submit button to do certain things like disable submit button, only submit form once etc. This was a breeze...
0
by: =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= | last post by:
I'm having trouble working with a Summary Validation control. I need to click my submit button twice for the Summary to display when validation errors occur on the page. Background: My page...
0
by: josephkorn | last post by:
Hi all. I have a problem in my website in trying to prevent a user from double submitting the form. I am calling a subroutine from my page_load event that passes in the commandbutton that I want...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.