Button Onclick and OnClientClick Event should not fire together

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manav kapila
    New Member
    • May 2012
    • 1

    Button Onclick and OnClientClick Event should not fire together

    In the onclientclick event of a button, I have a javascript code that returns either true or false. My question is that Onclick event of that button should fire only if onclientclick returns true otherwise not.
  • firexfighterx
    New Member
    • May 2012
    • 14

    #2
    If you have Javascript validation is client side. The onclick event is server side. The client always runs first. Hope this helps.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Please check out this article about How to use JavaScript in ASP.NET. If you still have questions after you read it, post back here :)

      Comment

      Working...