Skip to content Skip to sidebar Skip to footer

"formatexception Was Unhandled" Input String Was Not In A Correct Format

I have an error in my website and trying to resolve: Error 'format exception was unhandled' such that it work for both date time as well as with string and integer. Please see the

Solution 1:

return Convert.ChangeType(IsThisObjectANull, DataTypeCode);

The conversion is probably failing due to incompatible types . You might have to debug and check when this happens .

Solution 2:

Perhaps some try/catch mechanism?

Post a Comment for ""formatexception Was Unhandled" Input String Was Not In A Correct Format"