title: How to format from SqlDataReader string to currency format in Asp.net?
body: <p>I retrieve value from database like this <code>173557.0000</code>. I want to display like <code>1,73,557.00</code>.</p>
  
  <p>This is my code what tried</p>
  
  <pre><code>Table1001Hour.Rows[i].Cells[0].Text = rd["hour"].ToString();
  Table1001Hour.Rows[i].Cells[1].Text = string.Format("{0:C}", Convert.ToInt32(rd["salesCost"].ToString()));
  </code></pre>
  
  <p>But it throws an error message.</p>
  
  <blockquote>
    <p>Input string was not in a correct format.</p>
  </blockquote>
  
  <p>If I don't convert to string it shows like same as it is <code>173557.0000</code></p>
  
  <p>Thanks</p>