Server Error in '/' Application.

Conversion from type 'DBNull' to type 'Decimal' 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: Conversion from type 'DBNull' to type 'Decimal' is not valid.

Source Error:


Line 171:                        lblVasaUstedaValue.Visible = True
Line 172:
Line 173:                        Dim CijenaAkcija As Decimal = dtr("CijenaAkcijaHr")
Line 174:
Line 175:                        Dim Usteda As Decimal

Source File: D:\HostingSpaces\provoxhr\provox.hr\audio\proizvod.aspx.vb    Line: 173

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'Decimal' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToDecimal(Object Value, NumberFormatInfo NumberFormat) +452919
   Microsoft.VisualBasic.CompilerServices.Conversions.ToDecimal(Object Value) +6
   audio_proizvod.Page_Load(Object sender, EventArgs e) in D:\HostingSpaces\provoxhr\provox.hr\audio\proizvod.aspx.vb:173
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.8806; ASP.NET Version:2.0.50727.8762