Click here to Skip to main content
15,886,664 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Currency formatstring Not Working in Asp.net GridView Template Field

Below code Not Showing $(Currency symbol) symbol before Price


ASP.NET
<asp:TemplateField HeaderText="Price">
                                <ItemTemplate>
                                    <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Price","{0:C}") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>


Above code Not Showing $(Currency symbol) symbol before Price
Thanks
bajid
Posted

Use DataFormatString property for the Gridview Column.

Refer

Currency FOrmats[^]

http://msdn.microsoft.com/en-us/library/aa479342.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900