Click here to Skip to main content
15,896,557 members

Response to: Input string was not in a correct format.

Revision 3
If your input is coma separated then you can split the input and process it like below
C#
string []totals = txttotal.Text.Split(',');
foreach(string total in totals)
{
  Decimal decimalTotal;
  Decimal.TryParse(total,out decimalTotal);
  esc.totsa(decimalTotal); 
}


since you havent told how you want to process the txttotal input am just putting the number split code alone. You may adjust this to your requirement.

Update
Use the Decimal.TryParse or Parse as suggested by SA in Solution 1[^] for conversions.
Posted 14-Feb-13 14:30pm by Jibesh.