Server Error in '/' Application.

Input string was not in a correct format.

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.FormatException: Input string was not in a correct format.

Source Error:


Line 131:        div_description.InnerHtml += "<tr><th class='.th' scope='row'>" + trad.traduci("prezzo", lingua) + "</th>";
Line 132:        div_description.InnerHtml += "<td class='cat_list2'>";
Line 133:        decimal price = decimal.Parse(rdr["prezzo"].ToString());
Line 134:        decimal offerta = 0;
Line 135:        if (rdr["offerta"].ToString() != System.DBNull.Value.ToString() && rdr["offerta"].ToString() != "0")

Source File: c:\inetpub\vhosts\urbinoliving.it\httpdocs\controls\catalogo.ascx.cs    Line: 133

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +12937893
   System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt) +131
   System.Decimal.Parse(String s) +25
   public_catalogo.impagina() in c:\inetpub\vhosts\urbinoliving.it\httpdocs\controls\catalogo.ascx.cs:133
   public_catalogo.page_load() in c:\inetpub\vhosts\urbinoliving.it\httpdocs\controls\catalogo.ascx.cs:65
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +9873645
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4076.0