473,657 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Client Side OnBlur Triggering Validation

Hello,
Does anyone know how I can stop the RequiredFieldVa lidator from validation OnBlur and OnChange. I only want it to validate when the user submits the form (but still want it to run client side)

Thanks

Nov 18 '05 #1
1 4406
Two solutions:

1. Disable client side validation. Set EnableClientScr ipt to false on the
validators. Your server side code to validate takes over. (You did write
code to check Page.IsValid, right?)

2. Microsoft's validators are quite limited. I rewrote validation for
ASP.NET to handle a greatly expanded set of possibilities, so that you
wouldn't have to develop custom code or (in this case) hacks. Within
"Profession al Validation And More" (http://www.peterblum.com/vam/home.aspx),
you can keep client side validation enabled and disable validation during on
change by setting each validator's EventsThatValid ate property to
"OnSubmit". I put together a list of limitations in Microsoft's validators
at http://www.peterblum.com/vam/valmain.aspx to assist users as they design
their site's validation.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Joe.Dattil o" <Jo********@dis cussions.micros oft.com> wrote in message
news:E5******** *************** ***********@mic rosoft.com...
Hello,
Does anyone know how I can stop the RequiredFieldVa lidator from validation OnBlur and OnChange. I only want it to validate when the user
submits the form (but still want it to run client side)
Thanks

Nov 18 '05 #2

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

Similar topics

3
1401
by: arc | last post by:
I have a server object that performs zipcode validation based on zipcode entered in the web form. Ideally this should work as follows: Once the zip code is entered in the edit box it should validate the entry with this server object before moving to enter state in the next dropdown field. - What is the event by which we can do this for the edit box? (OnBlur doesnt seem to capture the text though it fires up the server object) - This...
1
11292
by: Christoph | last post by:
I'm trying to validate some HTML form elements when the user tabs out of each element. However, I'm having some problems. It appears that the order of events is onChange followed some time afterwards by onBlur. I believe this to be the case because in my onChange script, if the validation fails, I force focus back to the field element. However, the focus still falls to the next field and not back to the field I tried to force the...
4
2364
by: | last post by:
Hello Guys, I am using the validation controls to validate my data. But the problem is "The page is still being posted to server". I want to get rid of the round trips to server. Are there any get arounds for this problem apart from the traditional JavaScript?
14
6291
by: Matt | last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or Client-Side form validation? Since I think each validator control can select either 1) JavaScript based error dialog or 2) show the error message next to the control. For example, if the text field is empty with RequiredField Validator control, it can show the value in ControlToValidate property in two ways as I mentioned. Please advise. Thanks!
8
3355
by: moondaddy | last post by:
I have a form for entering a user's address and all fields have a required validating control associated with them and the error msg for each field displays right next to it. The normal behavior is that the error msg doesn't show unit the use hits the submit button or the user enters data and moves the focus to another control so the field becomes dirty. So far so good. Now when the user goes back to that control and starts to input data...
9
2219
by: AFN | last post by:
I was just dropped into someone else's code (isn't that always so fun?). I can't figure out why a custom validation control's server event function is executing. There is nothing (that I see) in page_load, or elsewhere, that says page.validate, no control says "causesvalidation=true", and the AutoEventWireup is set to false. So I would think that the control's server event function would NOT execute, but it does execute right after...
1
1257
by: owen79 | last post by:
Hi, I have a repeater on a asp.net (c#) page that holds the details of daily bed occupancy for a hostpital ward for any given date. For each hostpital there are a number of wards. So a hostiptal with 5 wards has 5 elements each containing a textbox for occupied and another for remaining available. As the user cycles through the txtboxs I want to catch the textchanged and add all the occupied values together and the same with the...
0
924
by: ginnone | last post by:
I've got several TextBox in my aspnet 2.0 web page. I'm able to assign validators to those controls, and i'm able to perform both client side and server side validation. The only thing I need, is to cause the validation (without postback) on the onblur event of tese textboxes. The reason is that the value of these textboxes is set by some javascript functions. The client side validation still work when I press the submit (asp:Button); but...
0
1020
by: Nathan Sokalski | last post by:
I have written a Validator (a class that inherits from the BaseValidator class), and it includes client-side validation functions. The validator is a conditional validator that only validates if a specified checkbox, radiobutton, dropdownlist item, etc. is checked or selected. The only feature I have left to add is to hide the error message if they uncheck or unselect the checkbox or radiobutton by use of the onchange eventhandler. Is...
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.