Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validating and Parse problems
Message
From
31/03/2004 12:16:23
James Hansen
Canyon Country Consulting
Flagstaff, Arizona, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
Forms
Title:
Validating and Parse problems
Miscellaneous
Thread ID:
00891209
Message ID:
00891209
Views:
64
I have been trying for a couple days to figure out how to create a textbox into which I can enter a time span as mm:ss.hh and store hundredths of a second to a bound table field. The table field is integer hundredths of a second and I use the Format method to display the value in the format mm:ss.hh

I use the Parse event to convert the text in the text value to an integer number of hundredths of a second. This works just fine if I enter a valid value. But if I enter an invalid value, I cannot figure out how to display an error message, then allow corrections to the invalid entry. No matter what I do, the value in the textbox is reset to whatever it was before I changed it.

I could not find any way from the Parse event to cancel the data save, so I tried adding a Validating Event handler and setting e.Cancel to true, but the Parse runs anyway, killing the value in the textbox.

Is this a problem with my understanding of the .NET framework, a "feature" of .NET, or a problem with using the Mere Mortals framework mmTextBox with binding? Any help will be appreciated.

...Jim
Next
Reply
Map
View

Click here to load this message in the networking platform