Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation Controls not working on server 1

Status
Not open for further replies.

JCruz063

Programmer
Feb 21, 2003
716
0
0
US
Hi All...

I'm creating an ASP.NET application using Visual Studio 2002 in a Windows 2000 Server machine. I have a form with some validation controls which work beautifully. The form contains a button that, when clicked, causes a postback only if all the validation controls succeed. It works very nicely.

I'm using a computer with Windows XP Professional and IIS 5.1 to host the site (I've already purchased Windows 2003 web edition, but I haven't installed it yet, becuase a server computer that I purchased to host the site hasn't arrived). When I access the site online (i.e. by going to from any computer), the validation controls don't do their job. The button causes the postback whether the validation controls suceed or not. I mean, what's with that? Is there a setting in IIS that I need modify to allow clients to get the appropriate script code for the validation controls to work?

Thanks!

JC



_________________________________________________
To get the best response to a question, read faq222-2244.
 
Check the source of the page from the client. Is the validator rendering to the page properly? Also, does the client browser have javascript enabled? Validation controls rely on it.

So do you have a dynamic dns redirector to point your domain to the same machine, or is it a different machine that you deploy the app to?
 
Thanks for your reply dace...

This is how one of the validation controls is rendering on the client:
Code:
<span id="reqvalName" controltovalidate="txtName" errormessage="Your name is required." evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;visibility:hidden;">Your name is required.</span>

Javascript is enabled on the client because the client is me. I'm creating the application in a Windows 2000 machine. When I run the application from this machine (i.e. Selecting Start (F5) from the debug menu), the controls work beautifully.

I'm deploying the app to another machine (with Windows XP Pro and IIS 5.1). This is the machine that's serving the app when accessed online. When I use the Windows 2000 machine (or any other machine) to access the app from the internet (by going to the controls don't work.

Any suggestions?

Thanks!

JC

_________________________________________________
To get the best response to a question, read faq222-2244.
 
1) make sure it has the same version of the .NET framework installed

2) make sure you have a WebUIValidation.js file on the server, probably in the
C:\Inetpub\folder. If it's not there, you're missing some ASP.NET components - you need to install the correct ASP.NET server bits in addition to the .NET framework.
 
Thanks dace. I'll give it a shot!

JC

_________________________________________________
To get the best response to a question, read faq222-2244.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top