• Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a problem that is plaguing me. I have 3 controls on a very simple test asp.net page (button, textbox and requiredfieldvalidator)

The only modification to the aspx page was that i set the controltovalidate of the validator to Textbox1.

The form was posting back correctly until I add the validator. Now that i have added the validator clicking on the button no longer performs the postback. I have this same problem with another application also running on my localhost.

Just as fyi, I did install the post patch Q818803

What is going on?
thx
dave
 
To add to the problem, when i deploy this page to a web server everything works fine. It is just not working on my localhost.
ideas?
 
By design, Microsoft's validators prevent posting back when an error is
detected on the client side. You have described this situation perfectly. If
you want to turn it off, set the validator.EnableClientScript property to
false. Note that only IE browsers support the client-side validation.

On your other server, you are finding it posts back without a problem,
right? That actually means that ASP.NET validation is incorrectly setup on
that server. It SHOULD be stopping the page from submitting. Use
aspnet_regiis.exe -c on that server to install the client-side scripts
associated with validation and smartnavigation features of ASP.NET.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

dave said:
To add to the problem, when i deploy this page to a web server everything
works fine. It is just not working on my localhost.
 
Thank you for the response. I did find what was causing my problem. The webuivalidation.js file found i
C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_4322 was not a good one. I copied the contents of this directory to a bak then I ran regiis.exe to recreate the js files. I noticed that the webuivalidation.js file after i ran regiis was dated 4/22/2003. The webuivalidation.js file before was dated 2/20/2003

There were a few lines that were different between these two js files. I do not know how or when I got the "bad" js file. My problem is now resolved but if anyone has information on where the bad one came from it would be nice to know

Is there a web site that lists all the versions of this js file and the source of them
th
dave
 
Hi Dave,


Thanks for your followup. I'm glad that you've resolved the problem and
also thanks for Peter's suggestions.
As for the "webuivalidation.js" file you mentioned, it's one of the buildin
client script resources. Here are some tech references on the Clientside
supporting in ASP.NET:

#ASP.NET Validation in Depth
http://msdn.microsoft.com/library/en-us/dnaspp/html/aspplusvalid.asp?frame=t
rue

#Client-Side Functionality in a Server Control
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconclient-sidefunctio
nalityinservercontrol.asp?frame=true

#Injecting Client-Side Script from an ASP.NET Server Control
http://msdn.microsoft.com/library/en-us/dnaspp/html/aspnet-injectclientsides
c.asp?frame=true


Also, in ASP.NET Whidbey, the means generating clientscript for
servercontrols are more flexible, here is the introduction:
#Handling Client Files in ASP.NET Whidbey
http://msdn.microsoft.com/library/en-us/dnaspp/html/webresource.asp?frame=tr
ue

Hope these helpful.



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
 
Back
Top