In ASP.NET 2.0 with C# I have a repeater that is bounded to a datatanle.
I have there inside a <td> the following field:
<%# Eval("MinPrice")%>
If I write it like this: <%# Eval("MinPrice", "{0:C}")%> it does not show the currency sign
so I want to prepare it in the code behind in the repeater ItemDataBound event.
If I do there:
string AmountStr1 = String.Format("{0:C}", decimal.Parse(tempAmount));
I get the appropriate value. but in the databound event of the repeater I know how to deal with values from controls like button, hyperlink, hiddenfiels. but what do I do with value that is a field in the repeater but has no control?
How do I work on it and return it to the repeater?
Thankyou
Anat
In the repeater I did not find an option of HtmlEncode="false" but I manage to solve the problem in the
code behind like this:
Label lblMax = (Label)e.Item.FindControl(
string maxpStr = String.Format("{0:C}", decimal.Parse(lblMax.Text)
lblMax.Text = maxpStr.ToString();
Anat