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

RequiredFieldValidator control

Hello.

I have the web form where user can input some data in textboxes, I'm
validating user input with RequiredFieldValidator controls, then I have two
buttons "OK" and "Cancel".
Now when I press "OK" the RequiredFieldValidator works fine, but when I
press "Cancel" I don't want to validate inputs.
So how can I temporarily disable RequiredFieldValidator, because I want
press "Cancel" and handle some actions at server side?

Thank You.
Nov 18 '05 #1
2 1388
See if setting Button.CausesValidation to false helps. Remember this skips
all the validations not just required-field-validations.

HTH

"Dave" <da*********@hotmail.com> wrote in message
news:Ok**************@tk2msftngp13.phx.gbl...
Hello.

I have the web form where user can input some data in textboxes, I'm
validating user input with RequiredFieldValidator controls, then I have two
buttons "OK" and "Cancel".
Now when I press "OK" the RequiredFieldValidator works fine, but when I
press "Cancel" I don't want to validate inputs.
So how can I temporarily disable RequiredFieldValidator, because I want
press "Cancel" and handle some actions at server side?

Thank You.

Nov 18 '05 #2
It works fine:)
Thank you very much.

"Shiva" <sh******@online.excite.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
See if setting Button.CausesValidation to false helps. Remember this skips
all the validations not just required-field-validations.

HTH

"Dave" <da*********@hotmail.com> wrote in message
news:Ok**************@tk2msftngp13.phx.gbl...
Hello.

I have the web form where user can input some data in textboxes, I'm
validating user input with RequiredFieldValidator controls, then I have
two
buttons "OK" and "Cancel".
Now when I press "OK" the RequiredFieldValidator works fine, but when I
press "Cancel" I don't want to validate inputs.
So how can I temporarily disable RequiredFieldValidator, because I want
press "Cancel" and handle some actions at server side?

Thank You.

Nov 18 '05 #3

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

Similar topics

6
by: BK | last post by:
I'm having a really strange problem with and HtmlSelect server control (listbox) and a RequiredFieldValidator that I am trying to use to make sure that someone has items in the listbox. The way...
3
by: Navin | last post by:
Hello friends... On a single asp.net web page i have a single server-side form that contains a couple of user-controls. Each user control has its own functionality and contains server-side textbox...
1
by: peshrad | last post by:
Hi ! I'm using Visual Studio .NET to program a Web application coding in C#. In my form I use an HtmlSelect control that calls a JavaScript function when the selected item changes. This...
7
by: Ed West | last post by:
Hello, I have a simple form with some input boxes. After validation if one fails, then I would like to at the top of the page say something like "The following fields in red are required" and...
4
by: James | last post by:
Hello, I have a RequiredFieldValidator for several textbox controls on a form. Here's an example with the RequiredFieldValidator. EnableClientScript, Enabled, and Visible are set to true for...
2
by: Hongbo | last post by:
Hi, I have a Asp.Net written in C#. It serve as information input form. The form encounters sort of random problem with the email field and state field. I have validator attached with these 2...
1
by: Giovanni | last post by:
Dear Friends, I need your help. I am trying to dynamically create a RequiredFieldValidator in the ItemCreated event of a DataList but cannot get it to work. The errors seem to revolve around...
1
by: Arpan | last post by:
Suppose I have the following RequiredFieldValidator control which validates a TextBox: <form id="form1" runat="server"> <asp:TextBox id="txtVal" runat="server"/> <asp:RequiredFieldValidator...
2
by: Christina | last post by:
Hello !! I am creating a dynamic textbox and want to validate it using the requiredfieldvalidator. These are the steps which I tried: ==================================================== 1)...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.