if (this.RDPEndDate1.SelectedDate == null || this.RDPEndDate1.SelectedDate == DateTime.MinValue) { cmd.Parameters.AddWithValue( "@Conn_Datereceived", DBNull.Value); } else { cmd.Parameters.AddWithValue( "@Conn_Datereceived", this.RDPEndDate1.SelectedDate); }
public virtual Nullable SelectedDate {get; set;}However, since I do not have a control handy, and cannot guarantee that when **SelectedDate** is null then **AddWithValue** is going to be able to safely resolve it to **DBNull.Value**, I think that it is OK to do so explicitly just in case. [1]: http://www.sitefinity.com/help/developer-manual/radcalendar.net2-telerik.webcontrols.raddatepicker-selecteddate.html
No one has followed this question yet.