Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox Validating Pet Peeve
Message
From
01/03/2006 00:05:05
 
 
To
08/02/2006 11:59:26
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01094630
Message ID:
01100263
Views:
15
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!!!
Previous
Reply
Map
View

Click here to load this message in the networking platform