Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Catch of a bad date?
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Catch of a bad date?
Miscellaneous
Thread ID:
00932966
Message ID:
00932966
Views:
49
I'm trying to create a date textbox that will vaidate the date. I'm having a problem in my catch:

try
{
Convert.ToDateTime( this.TextBox1.Text.ToString());
}

catch(Exception e )
{
this.Label1.Text="Bad Date was attempted";
}

My catch doesn't ever seem to work "166.35.04" is not a good date.

Any ideas?

TIA

__Stephen
Next
Reply
Map
View

Click here to load this message in the networking platform