L
Loading name...
Hey
asp.net 2.0
I have a FormView on my webpage. This FormView's datasource is a
SqlDataSource object.
This SqlDataSource returns 1 datetime field. So I've added a Calendar
control to the FormView, and made this Calender control's SelectedDate:
SelectedDate='<%# Bind('helloDate') %>'
But during runtime my webpage crashes. The reason for the crash is the
datetime value I set to SelectedDate.
This is the exception I get when the webpage crash:
"Specified cast is not valid"
The datetime field had the value NULL (meaning the datetime value is not
set). Having the datetime not set means that the user hasn't decided a date
yet. so he must be able to choose a date at a later time
What should I do to fix this?
asp.net 2.0
I have a FormView on my webpage. This FormView's datasource is a
SqlDataSource object.
This SqlDataSource returns 1 datetime field. So I've added a Calendar
control to the FormView, and made this Calender control's SelectedDate:
SelectedDate='<%# Bind('helloDate') %>'
But during runtime my webpage crashes. The reason for the crash is the
datetime value I set to SelectedDate.
This is the exception I get when the webpage crash:
"Specified cast is not valid"
The datetime field had the value NULL (meaning the datetime value is not
set). Having the datetime not set means that the user hasn't decided a date
yet. so he must be able to choose a date at a later time
What should I do to fix this?