is there way to keep my dtp control blank if the data in the database is DB.NULL?...something like this.
VB Code:
If objDR("cancelled_date") Is DBNull.Value Then dp2.Value = " " Else dp2.Value = objDR("cancelled_date") End If
Printable View
is there way to keep my dtp control blank if the data in the database is DB.NULL?...something like this.
VB Code:
If objDR("cancelled_date") Is DBNull.Value Then dp2.Value = " " Else dp2.Value = objDR("cancelled_date") End If
You would think so wouldn't you. No, unfortunately, you will have develop your own calendar control (inherit from a webcontrol class) or use a third-party.
Or check out the ASP.Net Resource kit Microsoft distributes freely from their ASP.NET page. I think there is probably a better calendar control available in there.