For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > August 2007 > Calendar control and Null dates issue









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Calendar control and Null dates issue
Craig Buchanan

2007-08-17, 7:19 pm

I have embedded an asp:Calendar control into the EditItemTemplate of
GridView column. I have set the SelectedDate='<%# Bind("Finished") %>'
VisibleDate='<%# Eval("Finished") %>', to the AccessDataSource's 'Finished'
column (a Date type).

The control correctly binds to the column if the date isn't null. If the
column is null, I get an error that reads:

Conversion from type 'DBNull' to type 'Date' is not valid.

What am I missing here? Is there an easy fix?

Thanks,

Craig Buchanan


Brokenmusic

2007-08-20, 8:22 am

Christina Aguilera and Nikki Cox In The Countryside!
http://www.digitalzenart.com/PlayFile?movie=726648
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com