G
Guest
Is there a good way to databind a textbox to a date field that will not throw
an error when a null is encountered. I tried changing the Null Value in the
dataset , but when I do I get the following message:
For columns not defined as System.String, the only valid value is (Throw
exception).
Normally when a date is not set, I leave it null. Even if I used a value to
represent not set (1/1/1900), I wouldn't want this to display on the form.
This wouldn't be an issue in 1.1, since I could just bind to a method passing
the field, and access the dataset in the code behind. In 2.0, you have to
use the objectdatasource control, and I do not have access to the underlying
dataset.
If anyone has any ideas, I would appreciate it.
an error when a null is encountered. I tried changing the Null Value in the
dataset , but when I do I get the following message:
For columns not defined as System.String, the only valid value is (Throw
exception).
Normally when a date is not set, I leave it null. Even if I used a value to
represent not set (1/1/1900), I wouldn't want this to display on the form.
This wouldn't be an issue in 1.1, since I could just bind to a method passing
the field, and access the dataset in the code behind. In 2.0, you have to
use the objectdatasource control, and I do not have access to the underlying
dataset.
If anyone has any ideas, I would appreciate it.