Link to home
Create AccountLog in
Avatar of mrong
mrong

asked on

Conversion from DBNull to type string is invalid

Greeting,

I got error message "Conversion from DBNull to type string is invalid" at the following line. I thought we if stmt had took care the DBNull condition. Any help will be appreciated.

<%#IIf(String.IsNullOrEmpty(DataBinder.Eval(Container.DataItem, "location")), "None", (DataBinder.Eval(Container.DataItem, "location")))%>

ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.