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 419:                sGia = "<span class='Gia'>" + double.Parse(tbTinDang.Rows[0]["TuGia"].ToString()).ToString("#,##").Replace(",", ".") + " VND" + "</span>";
Line 420:
Line 421:            sGia = "<span class='Gia'>" + double.Parse(tbTinDang.Rows[0]["TuGia"].ToString()).ToString("#,##").Replace(",", ".") + " VND" + "</span>";
Line 422:            dvGia.InnerHtml = sGia;
Line 423:            dvNgayDang.InnerHtml = "<p style='font-size: 13px; color: #a9a9a9;' >" + DateTime.Parse(tbTinDang.Rows[0]["NgayDang"].ToString()).ToString("dd/MM/yyyy HH:mm:ss") + "</p>";

Source File: c:\inetpub\vhosts\tungtang.com.vn\tungtang.com.vn\PostDetail.aspx.cs    Line: 421

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) +12739604
   System.Double.Parse(String s) +24
   TinDangChiTiet.LoadTinDang() in c:\inetpub\vhosts\tungtang.com.vn\tungtang.com.vn\PostDetail.aspx.cs:421
   TinDangChiTiet.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\tungtang.com.vn\tungtang.com.vn\PostDetail.aspx.cs:59
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2853


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