However, you get a click event registered on the client, it does not matter. Although, if you are using a server control, you want to use onclientclick. But the key is that you want to use return Validate (). Then, in your validate method, you return a true or false value depending on whether it was validated or not.
EDIT: make onclientclick look like this:
onclientclick="return Validate();"
Then in the check function:
function Validate() { return true; }
spinon
source share