ASP.NET
Eval Function Currency Format
03/17/2010
12:49:17 PM
2W20RHC3Z Show this entire thread in new window
Gratar Image based on email address
From:
Greg
To:
All 
Attachments:
None
Hi,
I am using the following code to format a currency field
in a .NET GridView TemplateField.
The probelm is that the display of the "$" is inconsistant. Sometimes
it is there, sometimes it is not after a postback. The commas and decimal
point always works though.
Any idea what I might be doing wrong?

<asp:TemplateField > <ItemTemplate> <asp:TextBox ID="txtPrice" runat="server" Font-Size="9" Width=90px MaxLength=15 Text =<%# Eval("money_price","{0:$0,0.00}") %>/> </ItemTemplate> <HeaderTemplate>Price</font> </HeaderTemplate> "False" /> "RightAlign" /> </asp:TemplateField>