views:

94

answers:

0

Hello,

I have an asp.net application that is getting its data from sql server. I am using an entitydatasource that gets the data for a detailsview.

I templetized the detailsview in the "edit" mode so that I can give the user a asp.net calendar control to select a date.

The problem is that when the user clicks on the "edit" button at the bottom of the detailsview, the page crashes because it tries to get a date from the database and set the value in the calendar control (I think)...because the field in the database is NULL, it crashes.

I guess one solution would be to simply fill in the database field for all entries to some dummy value (1/1/0001 12:00:00 AM) but that seems pretty sloppy.

I'm new to entitydatasource and so I don't really know how to programmatically handle the situation in which an eds feeds a calendar control a NULL value...I'd like to know how to intercept it?

Thanks for your comments.

Barry