Ошибка System.FormatException: Input string was not in a correct format.
Посмотрите плиз ошибку которая выдается мне на VB.NET:
файлы по адресу(убрать html):
http://www.geocities.com/alexburzak/crazyDetailRus.aspx.html
http://www.geocities.com/alexburzak/crazyDetailRus.aspx.resx.html
http://www.geocities.com/alexburzak/crazyDetailRus.aspx.vb.html
Заранее спасибо.
'-------------------------------------------------------------------------
Line 340: Dim DataOrder As String = Now.Year & "-" & Now.Month & "-" & Now.Day & " " & Now.Hour & ":" & Now.Minute
Line 341:
Line 342: SummEnd = CInt(Price) + myDelivery
Line 343:
Line 344: SQL = "INSERT INTO LGP_Zakaz (Client,Status,KolVo,SumEnd,DataOrder,KindPayment,Payments,Delivery) " & _
Source File: c:\inetpub\wwwroot\LogicPC\crazyDetailRus.aspx.vb Line: 342
'-------------------------------------------------------------------------
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 340: Dim DataOrder As String = Now.Year & "-" & Now.Month & "-" & Now.Day & " " & Now.Hour & ":" & Now.Minute
Line 341:
Line 342: SummEnd = CInt(Price) + myDelivery
Line 343:
Line 344: SQL = "INSERT INTO LGP_Zakaz (Client,Status,KolVo,SumEnd,DataOrder,KindPayment,Payments,Delivery) " & _
Source File: c:\inetpub\wwwroot\LogicPC\crazyDetailRus.aspx.vb Line: 342
Stack Trace:
[FormatException: Input string was not in a correct format.]
Microsoft.VisualBasic.CompilerServices.DoubleType.Parse(String Value, NumberFormatInfo NumberFormat) +195
Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value) +95
[InvalidCastException: Cast from string "365.00 ₪" to type 'Integer' is not valid.]
Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value) +210
LogicPC.crazyDetailRus.makeOrder() in c:\inetpub\wwwroot\LogicPC\crazyDetailRus.aspx.vb:342
LogicPC.crazyDetailRus.getOrder() in c:\inetpub\wwwroot\LogicPC\crazyDetailRus.aspx.vb:238
LogicPC.crazyDetailRus.CrazyOrder(Object sender, CommandEventArgs e) in c:\inetpub\wwwroot\LogicPC\crazyDetailRus.aspx.vb:223
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
Проблема вот с этой вот ^^^^ фигней. Из-за нее твою строку не получается преобразовать в число. Смотри откуда у тебя берется это значение и исправляй.
Этот трахнутый знак убрал: ₪
Сам мучился неделю, не мог найти.