Getting exception while calculating the total of gridview cells
<p>while calculating the total of gridview cells i am getting this exception:
<strong>Input string is not in correct format.</strong></p>

<p>Here is my code: any help pls:</p>

<pre><code> public decimal GetTotal()
 {
  decimal total = 0;
  foreach (GridViewRow _row in GridView1.Rows)
  {
  TextBox txt = (TextBox)_row.FindControl("TextBox1");
  total +=decimal.Parse( txt.Text);
  }
  return total;
} 
</code></pre>
