473,387 Members | 3,820 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,387 software developers and data experts.

Problems with Validator controls

I'm using the RequiredFieldValidator on 9 text boxes and then a Validation
Summary control for bringing up a message when the user tries to click a
button that makes a trip to the server. This works fine on my development
machine, but when I copy the project to my test web server the required
validation doesn't occur and the summary dialog doesn't come up. The user is
allowed to click the button and it processes the event code on the server
just like there are no Required Field Validator controls. I'm not sure why
it would work on my machine, but not on the test web server. I think at one
point I had it working on the test web server, too. Any ideas for trying to
solve this will be much appreciated.

One other question about the Validator controls. Is there a way to suppress
the error messages from the individual controls and have the user just see
the summary dialog. That's what I'd really like. I don't like having to
provide real estate on my form for each field showing the errors.

Thanks,

John Holmes
jo****@co.skagit.wa.us
Nov 18 '05 #1
1 1144
Hi John,

Thanks for posting in the community!
From your description, you used RequiredFieldValidator controls and
ValidatioSummary control on a certain ASP.NET webpage to ensure the input
of some certain ASP.NET TEXTBOX server controls. However, you found the
validiton worked on your dev machine but not work on a test server machine
and also you wonder how to only show the validateSummary's message rather
than also display the individual required validator's message ,yes?

As for the first problem, I'd like to confirm on some further questions:
1. Are the RequiredValidators all set as EnableClientScript = true ? If so,
try set it as false to see whether the serverside validation work on both
machine.(I think it should work).

2. If # works , there seems have some problems with the ASP.NET buildin
clientside scripts on the test servermachine. Are the dotnet framework's
version same with the two machines? If so, I think you can try reinstalling
the ASP.NET buildin clientside script resources. Just open the Visual
Studio.net command prompt , througth the following steps:
Visual Studio.NET -->Visual Studio.NET tools --> Visual Studio.NET Command
prompt
Then in the command line window, type:
aspnet_regiis -c
this will reinstall the client-side scripts for ASP.NET, such as
client-side validation scripts, to the aspnet_client subdirectory of each
IIS site directory. For detailed info on the tool, you can view the
following reference in MSDN:

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

As for the second question --- only show the "validationSummary" control's
message, I think you can use the RequiredFieldValidator control's "Display"
property, try setting it to "none" in the propety window. Then, the
RequiredFieldvalidator's own error message won't be displayed.

Please check out the above suggestions. If you have any further questions
or new findings, please feel free to post here.

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

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

Similar topics

0
by: Antonio Maciel | last post by:
Hi. I tried the asp.net newsgroup before but with no success. I have some asp.net validator controls on the pages of a site. In IE the controls work ok but when I run the site on Netscape 7...
0
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These...
2
by: Pham Nguyen | last post by:
Has anyone seen an example of a textbox server control that has built-in client-side validation? I'd like to build a server control that extends the System.Web.UI.WebControls.TextBox class to allow...
2
by: Dune | last post by:
Hi there, If a control is disabled (enabled = false), will the validator controls associated with it automatically know not to carry out validation? I have a page with a bunch of controls and...
9
by: Alex Shirley | last post by:
Hi there I’m simply trying to check for a blank or empty value in a textbox on my webform. In this instance I do not want to use a requiredfieldvalidator, I want to use a customvalidator (as I...
3
by: Angelos Karantzalis | last post by:
Hi guys, I've a small problem with validators. I'm building a single .aspx file that handles all my form posts. I need to be using ASP.NET validators ( or subclasses thereof ), so what i do to...
1
by: Sam | last post by:
Hi all, Why can't i create a validatorControl as a child of the control to validate? It doesn't give any errors, but it just won't work (it's not validating). The reason why i want this is...
3
by: dpomt | last post by:
I am facing some issues with the webforms DefaultButton functionality: #1 One text box ==> hitting enter works in IE but not in Firefox (1.5) #2 One text box and req. field validator ==> problem...
2
by: Mike Collins | last post by:
I have a form where I create dynamic controls at runtime. With this, I am adding a dynamic required field validator to each control as needed, but the validators are not firing when I click submit....
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.