473,406 Members | 2,763 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,406 software developers and data experts.

Required validator always firing

I have a RequiredFieldValidator on a DropDownList but it fires even when I
click the cancel button. How can I ignore and still keep the required
validation if the user actually makes entries in the other fields. Thanks.

David
Apr 23 '07 #1
1 1056
Simply set the CausesValidation property of the Cancel button to false.
Here's more info:
http://SteveOrr.net/articles/Validation.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"David C" <dl*****@lifetimeinc.comwrote in message
news:eP**************@TK2MSFTNGP03.phx.gbl...
>I have a RequiredFieldValidator on a DropDownList but it fires even when I
click the cancel button. How can I ignore and still keep the required
validation if the user actually makes entries in the other fields. Thanks.

David
Apr 23 '07 #2

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

Similar topics

0
by: Jonas Bush | last post by:
I have a webpage (mypage.aspx) that contains a usercontrol (mycontrol.ascx) In that user control, there's a DataList In the OnInit method of mypage.aspx, I call mycontrol.BuildControl(), which...
0
by: Marty U. | last post by:
I have a RequiredFieldValidator on a textbox in a datalist edititemtemplate section. The validator is working fine. However, if I leave the textbox blank and get the error message, when I correct...
2
by: Jim Heavey | last post by:
Hello, I created a simple javascipt routine to do some validation. I attached that script to my ASP Button with the following code... cmdAddTask.Attributes = "javascript:return...
0
by: bcutting | last post by:
I have a control which inherits from TextBox and supplies some additional data functionality. I was hoping to include a boolean flag "Required" that can be set in the designer. When the flag is...
3
by: tshad | last post by:
Can you use a Required Validator on a CheckBoxList? You can on a RadioButtonList. But when I try on my CheckBoxList I get the error: Control 'RFPServiceTypes' referenced by the...
1
by: Jeremy | last post by:
I am implementing a shopping cart on a project and am getting extremely frustrated because my session variable's are not persisting. After doing some research I may have discovered the source, I...
0
by: trully | last post by:
Hello! How can in use simple asp.net(2.0) required validator in <atlas:updatepanel? If i simply put textbox and required validator between <atlas:updatepaneltags ..javascript error about no...
0
by: sinureddy | last post by:
I am working on ASP.Net2.0 I have a TextBox, a associated RequiredFieldValidator and a LookupButton. I do have a Save Button. Without entering anything in TextBox I clicked Save Button....
0
by: service0031 | last post by:
Housekeeping is an interesting job or career where things are always changing, and even though you may work in a less than clean environment, you are required to always look clean and professional....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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,...
0
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...

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.