当数字型资料为空时(null),网页无法显示出来,请指教如何更正, 谢谢
当数字型资料为空时(null),网页无法显示出来,请指教如何更正, 谢谢!
(c#+asp.net)
Specified cast is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Specified cast is not valid.
Source Error:
Line 226: myProductDetails.ProductImage = ((string)parameterProductImage.Value).Trim();
Line 227: myProductDetails.UnitCost = (decimal)parameterUnitCost.Value;
Line 228: myProductDetails.RetailPrice = (decimal)parameterRetailPrice.Value;
Line 229: myProductDetails.OuterLength = (decimal)