I am getting the following error on my code : "Input String was not in a correct format". on the line following line:
Convert.ToDecimal(tdprice.InnerText).ToString("##.###");
In the code block:
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("##.###");
}
}
To get a full understanding of what I am trying to do please visit the following link Selecting an Item or column in a Repeater and changing the Data