Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

Conversion from type 'DBNull' to type 'String' is not valid.

$
0
0

Using the following function in-line due to the fact that the Code-Behind is not available...

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

I am still getting the same compiler error of invalid cast...

Is there anything wrong the code above or a reason why it would not work?


Viewing all articles
Browse latest Browse all 4850


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>