What do you mean that your catch does not seem to work? I tried this and it always catch the exception.
try
{
Convert.ToDateTime( "166.35.04");
}
catch(Exception e )
{
Console.WriteLine( "Bad Date was attempted" );
}
>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
Hector Correa