473,473 Members | 1,825 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Disabling Required Field Validator

I have a form with 2 textboxes, 2 required field validators for each
textbox, and 2 buttons (OK, Cancel)
Is it posible for cancel button to disable required field validators ?
Nov 18 '05 #1
4 8035
On Sat, 7 Aug 2004 07:31:09 +0300, Sorin Sandu <ss****@bizland.ro.invalid>
wrote:
I have a form with 2 textboxes, 2 required field validators for each
textbox, and 2 buttons (OK, Cancel)
Is it posible for cancel button to disable required field validators ?

Yes, the button class has a .CausesValidation property that you can set to
false
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #2
When I have to set this property ?
At the beginning of button.click event ?
"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> a scris în mesajul de
stiri:opscchtyfi75dg5d@cowboy...
On Sat, 7 Aug 2004 07:31:09 +0300, Sorin Sandu <ss****@bizland.ro.invalid>
wrote:
I have a form with 2 textboxes, 2 required field validators for each
textbox, and 2 buttons (OK, Cancel)
Is it posible for cancel button to disable required field validators ?

Yes, the button class has a .CausesValidation property that you can set to
false
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #3
On Sat, 7 Aug 2004 10:03:15 +0300, Sorin Sandu <ss****@bizland.ro.invalid>
wrote:
When I have to set this property ?
At the beginning of button.click event ?
"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> a scris în mesajul de
stiri:opscchtyfi75dg5d@cowboy...
On Sat, 7 Aug 2004 07:31:09 +0300, Sorin Sandu
<ss****@bizland.ro.invalid>
wrote:
I have a form with 2 textboxes, 2 required field validators for each
textbox, and 2 buttons (OK, Cancel)
Is it posible for cancel button to disable required field validators ?

Yes, the button class has a .CausesValidation property that you can set
to
false
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET


No, you set it immediately (when the page loads the first time) since I
assume it's always supposed to be false. You can do it either in the code
(in Page_Load when Not IsPostBack) or add an attribute of
CausesValidation="false" to the button in the .aspx

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #4
See
http://groups.google.com/groups?hl=e...D100%26hl%3Den
--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us
"Sorin Sandu" <ss****@bizland.ro.invalid> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I have a form with 2 textboxes, 2 required field validators for each
textbox, and 2 buttons (OK, Cancel)
Is it posible for cancel button to disable required field validators ?

Nov 18 '05 #5

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

Similar topics

5
by: Do | last post by:
Hi, Has anybody run into problems with Page.IsValid? My errors show up when the fields aren't filled correctly, but my processing continues even if the page is invalid. I leave name and...
6
by: Paul | last post by:
I am trying to setup a field validator and tried using the control to validate set to a dropdown list box but did not seem to work. Is there anyway to set this up or do you need to use client side...
2
by: z. f. | last post by:
Hi, i have a field with required field validator. on the client side it's working. when i submit without the required field the page gets back because of not valid, but the message from the...
1
by: Sam Collett | last post by:
Is there a way of having a required field validator check to see if at least one of a set of controls has information in it? I'm sure this can somehow be done using a custom validator, but would...
3
by: Skeptical | last post by:
Hello, I have a form and two buttons on it. Button1 submits the data to a database and RequiredFieldValidator is used to make sure all the required fields are filled up, the second button has a...
3
by: Mike Collins | last post by:
Is it possible to use a required field validator and have it make a user answer a comment field based on a drop down value picked? For instance, if the user selects "It was terrible", make them...
7
by: Newbie Coder | last post by:
How do I use a Required Field Validator control in ASP.NET 2.0 to validate an e-mail address entered into a textbox control because there is no VALIDATION EXPRESSION like in previous versions? ...
0
by: nimeshdotnet | last post by:
Hi All, I have a textbox whose readonly property is set to true. This textbox is also guarded by a required field validator. What i m doing that I have a calendar control whose on date selection i...
6
by: mathewgk80 | last post by:
Hi all, I have two textboxes, txtName and txtDescription. i added required field validator to both of them. I have a Gridview in the same page. In tht gridview, i have a template field...
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...
1
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,...
1
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...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.