I have a situation in which an ASP.NET form has two .NET buttons which fire backend code.
One is the general Submit button for processing the form. When this button is clicked to submit the form I perform some javascript client side validations before allowing the form to be submitted to the backend.
The other button performs some optional processing on the backend and loads a dropdown for the PostBack. When this button is clicked one field should be javascript client side validated before passing the form to the backend. When this button is clicked I do not want to perform the general form client side validations. Those client side validations should only be performed when the main Submit button is clicked.
How can this conditional validation scenario be accomplished on the client side in an ASP.NET form? I tried setting a global form variable flag in the client side "OnClick" of each button to be tested in the main validation routine but ASP.NET does not appreciate this. Can the client side "OnClick" be used in an ASP.NET form and if so, is there some special syntax? What am I missing here?
Thanks,
Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.