şimdi
Datalist kullandıgım ıcın bu şekilde degiştirdim
bi.Price =Int32.Parse((e.Item.FindControl("LblFiyat") as Label).Text);
tam sayılarda sorun yok ama ondalık sayılarda hata veriyor
Kod: Tümünü seç
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 83: bi.StkKod = (e.Item.FindControl("LblKod") as Label).Text;
Line 84: bi.Title = (e.Item.FindControl("LnkUrunadi") as LinkButton).Text;
Line 85: bi.Price =Int32.Parse((e.Item.FindControl("LblFiyat") as Label).Text);
Line 86: bi.StkBrm = (e.Item.FindControl("LblBrm") as Label).Text;
Line 87:
Source File: c:\Inetpub\wwwroot\B2B\productList2.ascx.cs Line: 85
Stack Trace:
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2755599