Format Currency without currency symbol


Here is a way I came up with in a TemplateField: 

(my machine’s culture is US, so may need to change the Replace currency symbol if your culture is different)

<asp:TemplateField HeaderText="amount" SortExpression="amount">

<ItemTemplate>

<asp:Label ID="Label1" runat="server" Text=’<%# Convert.ToString(Eval("amount","{0:c4}")).Replace("$", "") %> ></asp:Label>

</ItemTemplate>

</asp:TemplateField>

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s