Page.RegisterOnSubmitStatement problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gandalf

    #1

    Page.RegisterOnSubmitStatement problem

    If I have a javascript function on my page that I wish to be called
    immediately before the form is submitted, using
    Page.RegisterOn SubmitStatement might seem the ideal method to use. However,
    using it to add a call to my function (in the form OnSubmit attribute)
    places the call BEFORE the call to any validators...wh ich is not what I want
    to happen. I want to call my function only if the validators have returned
    true. If I hard-code the OnSubmit attribute in the .aspx page the call to
    the validators gets placed before the call to my function, but I really need
    to be able to add it dynamically from the codebehind. Is there a way to do
    this?

    Thanks in advance.

    --



Working...