Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any way to bypass Validating event when closing form?
Message
De
11/02/2008 15:23:51
 
 
À
11/02/2008 14:55:22
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Divers
Thread ID:
01291525
Message ID:
01291598
Vues:
9
Hi John.

I set up this test code in a windows forms project and it works just fine. The exit takes place everytime regardless of wether I type "1234" or "abcd" in the box and hit the X.

Thanks so much for taking the time to set this up for me. Actually, Viv helped me sort it out. All I had to do was to set e.Cancel = false. Is one method preferred over the other?

But now I noticed some other goofy behavior. My Validating_Number is an event handler for 2 different text boxes on the form. It behaves perfectly for the first text box in the tab order. But the behavior is squirrelly for the second text box, When I tab out of the text box, the validation code does not run. But when I tab back into it, it does! Any ideas about what could be causing this?

Thanks for all the help.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform