Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any way to bypass Validating event when closing form?
Message
From
11/02/2008 15:23:51
 
 
To
11/02/2008 14:55:22
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01291525
Message ID:
01291598
Views:
8
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform