Server Error in '/components' Application.

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

Source Error:

Line 48:             tempHTML = Replace(tempHTML, "%%BATHS%%", RSrow.Item("BathsTotal"))
Line 49:             tempHTML = Replace(tempHTML, "%%PRICE%%", FormatCurrency(RSrow.Item("ListPrice"), 0))
Line 50:             tempHTML = Replace(tempHTML, "%%SQFT%%", FormatNumber(RSrow.Item("LotSquareFootage"), 0))
Line 51: 
Line 52:             tempHTML = Replace(tempHTML, "%%IMG%%", GetPhoto(RSrow.Item("Photos")))

Source File: C:\_Web Clients\_CMS Site Model\inc-components\client-apps\587-psg-listings.aspx.vb    Line: 50

Stack Trace:

[InvalidCastException: Conversion from type 'DBNull' to type 'Currency' is not valid.]
   Microsoft.VisualBasic.Strings.FormatNumber(Object Expression, Int32 NumDigitsAfterDecimal, TriState IncludeLeadingDigit, TriState UseParensForNegativeNumbers, TriState GroupDigits) +430
   cbh_class.onPageLoad(Object sender, EventArgs e) in C:\_Web Clients\_CMS Site Model\inc-components\client-apps\587-psg-listings.aspx.vb:50
   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.8799; ASP.NET Version:2.0.50727.8762

Requst a Showing

, CA

* Name:
* Phone:
* Email: