473,382 Members | 1,392 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,382 software developers and data experts.

validation ctrl blocks submit button click event

Hopefully an easy answer.

I've got a form with 1 input field, and a submit button. I register an
event for the button, run in debug mode, push the button and sure enough
I'm in the event handler. But when I add a validator to the form and
connect it to the input field then I never can debug into the breakpoint
in the buttons' handler. The validation works as expected.

Why and how does the validator somehow inhibit the buttons' click event?

cheers,

Martin
Nov 19 '05 #1
2 1788
Oops.

Just found out. If a validator fails then the click event doesn't fire.
Which is nice in a way, but I get the nagging feeling that I might like
some buttons to work on an "invalid" page. Can I circumvent the validators?

double oops.

Yes I can by setting the CausesValidation property of the button to false.

I'm glad the answer was straighforward.
Martin Knott wrote:
Hopefully an easy answer.

I've got a form with 1 input field, and a submit button. I register an
event for the button, run in debug mode, push the button and sure enough
I'm in the event handler. But when I add a validator to the form and
connect it to the input field then I never can debug into the breakpoint
in the buttons' handler. The validation works as expected.

Why and how does the validator somehow inhibit the buttons' click event?

cheers,

Martin

Nov 19 '05 #2
Hey Martin,

Check this out?

"The validation controls stole my client-side click event. How do I get it
back? "

http://authors.aspalliance.com/kenc/faq6.aspx

Ken

"Martin Knott" <la******@coldmail.com> wrote in message
news:41**********@news.bluewin.ch...
Hopefully an easy answer.

I've got a form with 1 input field, and a submit button. I register an
event for the button, run in debug mode, push the button and sure enough
I'm in the event handler. But when I add a validator to the form and
connect it to the input field then I never can debug into the breakpoint
in the buttons' handler. The validation works as expected.

Why and how does the validator somehow inhibit the buttons' click event?

cheers,

Martin


Nov 19 '05 #3

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

Similar topics

7
by: Mike | last post by:
I've been trying for the past week to put a simple code together. I have done a LOT of searching, found scripts showing the functions I would like to use, however when I mix them it all goes wrong,...
2
by: lmeng | last post by:
Hi, I am new to this Forum. Thanks in advance for any kind help. In the following HTML code, when I change the value of one text field then click "Modify" button, if the validation fails a...
4
by: Tim Meagher | last post by:
I am trying to use both validation controls and to add submit button attributes, but when I add the button attributes, the javascript fpr the validation controls is no longer created for the page. ...
1
by: iMedia User | last post by:
I have a site where I want to use the Web form validators in two separate forms on a single page. One form allows existing users to log in while the second one allows new users to register. The...
6
by: Nedu N | last post by:
Hi, I want to have confirmation(Yes/No) on a button of the webform in which there are many validation controls. I want all the validation controls to be triggered first and then Yes/No...
2
by: Martyn Fewtrell | last post by:
Dear All I have a Windows 2003 Server with IIS6 where the validation controls on ASP.Net pages no longer work. I believe it to be specific to the server as if I create an ASP.Net page on the...
1
by: sck10 | last post by:
Hello, I have a button that is associated with a validation group. When I click the button and a validation fails, I still want to code to execute. Can this be done? Any help with this would...
1
by: rmgalante | last post by:
I have written an ASP.Net application that uses the standard client-side and server-side validation for various fields on the form. Some of the customers that use the form report symptoms that...
9
by: Bill Long | last post by:
I have a control that simply displays a list of links. Following one of the links doesn't post back or redirect to another page, it simply hides the current panel and shows the one you selected......
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.