title: Input String was not in correct format error C# ASP.NET
body: <p>I am getting the following error on my code : "Input String was not in a correct format". on the line following line: </p>
  
  <pre><code>Convert.ToDecimal(tdprice.InnerText).ToString("##.###");
  </code></pre>
  
  <p>In the code block:</p>
  
  <pre><code>protected void rptConsole_ItemDataBound(object sender, RepeaterItemEventArgs e)
      {
          if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
          {
              HtmlTableCell tdprice = e.Item.FindControl("price") as HtmlTableCell;
              tdprice.InnerText = Convert.ToDecimal(tdprice.InnerText).ToString("##.###");
          }
      }
  </code></pre>
  
  <p>To get a full understanding of what I am trying to do please visit the following link <a href="https://stackoverflow.com/questions/24204529/selecting-an-item-or-column-in-a-repeater-and-changing-the-data">Selecting an Item or column in a Repeater and changing the Data</a></p>