472,353 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

using RegisterOnSubmitStatement prevent submit button handler firing

APA
Why does adding code to the form submit function using the RegisterOnSubmitStatement method prevent the server side event handler for the submit
button from firing? This is completely useless. I need some custom javascript validation on form submit but why does is kill the submit button event
handler? Submit buttons don't use __doPostBack so what is being effected?
Apr 12 '07 #1
2 2700
The client script executed by the submission of the form must return true in
order to allow the form to submit. This enables the client-side script to
prevent the submission of the form conditionally.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"APA" <bu******@hotmail.comwrote in message
news:ug**************@TK2MSFTNGP02.phx.gbl...
Why does adding code to the form submit function using the
RegisterOnSubmitStatement method prevent the server side event handler for
the submit button from firing? This is completely useless. I need some
custom javascript validation on form submit but why does is kill the
submit button event handler? Submit buttons don't use __doPostBack so
what is being effected?

Apr 12 '07 #2
APA
The problem is when it does return true. When the form does submit it doesn't fire the submit button eventhandler.

Kevin Spencer wrote:
The client script executed by the submission of the form must return true in
order to allow the form to submit. This enables the client-side script to
prevent the submission of the form conditionally.
Apr 12 '07 #3

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

Similar topics

13
by: John Kiernan | last post by:
Hey JavaScript gurus... I'm going to try this again. I haven't gotten as much help as I have advice on style<grin>. I appreciate (having...
1
by: Stan | last post by:
If a page has a button with event handler private void btnAdd_Click(object sender, System.EventArgs e) { ....... } this event handler fires...
5
by: Steve S | last post by:
Heres what I want to do...User types into a texbox, clicks a button, the button saves that text to a file. The problem is that when I click the...
2
by: Stephen Miller | last post by:
Can the CustomValidator be used to simply report unexpected errors, without requiring Client/Server validation? To explain, say you had a simple...
0
by: Chris Fink | last post by:
My goal is to have an ASP.NET checkbox server tag with it's autopostback set to true, that when clicked will run the checkbox's CheckedChanged...
8
by: Pazza | last post by:
Hi, Is there a way to cause the form submit button click event handler to fire when posting to a aspx page using httpwebrequest. In my tests...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the...
1
by: APA | last post by:
Well, I've figured out a way around this mess. I have no idea why it doesn't work the way I think it should but I do know how to get it to work. ...
5
by: raylopez99 | last post by:
I have a form, Form6, that has a bunch of buttons overlaid on it. I want to be able to click on any arbitrary area of the form, and if that area...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.