Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditional Validation
Message
De
16/04/2004 10:09:31
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Conditional Validation
Divers
Thread ID:
00895521
Message ID:
00895521
Vues:
47
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform