using RegisterOnSubmitStatement prevent submit button handler firing

Discussion in 'ASP .Net' started by APA, Apr 12, 2007.

  1. APA

    APA Guest

    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?
     
    APA, Apr 12, 2007
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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?
     
    Kevin Spencer, Apr 12, 2007
    #2
    1. Advertising

  3. APA

    APA Guest

    Re: using RegisterOnSubmitStatement prevent submit button handlerfiring

    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.
    >
     
    APA, Apr 12, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gandalf
    Replies:
    0
    Views:
    1,131
    Gandalf
    Jul 26, 2003
  2. =?Utf-8?B?YW5hdA==?=

    RegisterOnSubmitStatement appear twice

    =?Utf-8?B?YW5hdA==?=, Feb 5, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,371
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    Feb 5, 2006
  3. Brian Christensen

    Loading/splash screen / RegisterOnSubmitStatement

    Brian Christensen, Aug 22, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    3,001
    sebandres
    Mar 1, 2010
  4. APA
    Replies:
    1
    Views:
    822
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=
    Feb 23, 2007
  5. jatrojoomla
    Replies:
    1
    Views:
    188
Loading...

Share This Page