Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How to suppress the effect of RequiredFieldValidator when clicking "Cancel" button?

Posted on 2006-03-29
Medium Priority
Last Modified: 2012-08-14

I'm working on an ASP.NET web application. It is a web form that includes many web controls. Many of the TextBox have their own RequiredFieldValidators.

On this web page, there are 2 buttons: Submit and Cancel. I'd like to have the following effect: when clicking "Cancel", it is directed back to the homepage, e.g. index.html.

Assumed that the following scenario occurs: a user accesses this web page, e.g to register a profile. There is no data is entered at any textbox. The user now clicks on "Cancel" to go back to the home page.

However, the page is not directed back to the home page. Instead, red marks are placed beside all the empty textboxes - required to have inputs -. It seemed that the RequiredFieldValidators starts doing their jobs no matter what happens.

If you have any idea about how to suppress the effect of the RequiredFiledValidator when we need to cancel the process, please help.

Thanks a lot,

Question by:somits
1 Comment

Accepted Solution

mppeters earned 2000 total points
ID: 16327047

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question