Basic Date Picker Documentation

BDPLite.IsNull Property

Gets a value indicating whether the SelectedDate is [Null]. There is no DateTime Null value in .NET, so DateTime.MinValue is returned to represent [Null].

[Visual Basic]
Overrides Public ReadOnly Property IsNull As Boolean
public override bool IsNull {get;}

Property Value

Is the SelectedDate DateTime.MinValue (Null).


The DateTime object is a value type and can not be null. BDPLite uses DateTime.MinValue to represent a Null DateTime.


The IsNull property allows for easy checking of empty dates.

 if (!BDPLite1.IsNull && BDPLite1.IsDate)

If you are using a DataReader, using the IsDBNull method simplifies setting the SelectedDate.

 BDPLite1.SelectedDate = myReader.IsDBNull(0) ? DateTime.MinValue : myReader.GetDateTime(0)
 //<--- 0 is the column in the DataReader.

See Also

BDPLite Class | BasicFrame.WebControls Namespace | IsDate | DateTime.MinValue