Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Textbox Validating Pet Peeve
Message
De
01/03/2006 00:05:05
 
 
À
08/02/2006 11:59:26
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01094630
Message ID:
01100263
Vues:
14
Hi!

Just wanted to share how I work around this problem. On my forms I usually have two boolean variables for checking the state of the form. IsLoading and IsClosing. I make use of this two variables to by pass routines/validations that may occur when the form is either loading or closing. Initially IsLoading is TRUE and is set to false as soon as the form finishes loading.

Why do I do this? Mainly because when a form loads I usually initialize some variables and objects. Some of these objects fire up events that should be fired up only when the user changes a value, but since during start up it is posible for the form to initialize these objects... certain events fire. So to by pass these I usually add a check on the first line of the event to check if the form is loading or closing. If it is... I exit the event immediately. I use the same technique when I close the form.

Got the idea?

Regards,

Martin
Shit happens!!!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform