M
Matt MacDonald
Hi All,
This is hopefully a stupid question.
I have a page with a details view that is bound to an object datasource.
The datasource pulls back a strong-typed datatable from my users database.
The way my app works, a user will not automatically have a username and
password until one is assigned. That being said, when the detailsview binds
to the data, those two fields will be null. Logic would tell me that
wouldn't be a problem, because in other databound controls (gridview for
instance), it just replaces null values with empty strings. For whatever
reason, when I do a details view, I get something to the effect of
"Conversion from type 'DBNull' to type 'String' is not valid." for the
username field when I try to load the page. Any thoughts on how to get past
this would be greatly appreciated.
Thanks,
Matt
This is hopefully a stupid question.
I have a page with a details view that is bound to an object datasource.
The datasource pulls back a strong-typed datatable from my users database.
The way my app works, a user will not automatically have a username and
password until one is assigned. That being said, when the detailsview binds
to the data, those two fields will be null. Logic would tell me that
wouldn't be a problem, because in other databound controls (gridview for
instance), it just replaces null values with empty strings. For whatever
reason, when I do a details view, I get something to the effect of
"Conversion from type 'DBNull' to type 'String' is not valid." for the
username field when I try to load the page. Any thoughts on how to get past
this would be greatly appreciated.
Thanks,
Matt