Catch exception help please
Doing simple date work and trying to validate a date.
this.Label1.Text="Bad Date was attempted";
private void TextBox1_TextChanged(object sender, System.EventArgs e)
{
try
{
Convert.ToDateTime( this.TextBox1.Text.ToString());
}
catch(Exception ee)
{
this.Label1.Text="Bad Date was attempted";
}
What is the catch() expression to catch a bad date like 18/31/2004
Exception ee is missing it?
TIA
david 0Posted Aug 22, 2004, 11:17 AM
MykoninePosted Aug 13, 2004, 2:11 PM
mikerPosted Aug 13, 2004, 10:08 AM
srussellPosted Aug 13, 2004, 9:11 AM
asicPosted Aug 13, 2004, 7:53 AM
asicPosted Aug 13, 2004, 7:46 AM