Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 10553
  • Last Modified:

EURO currency symbol with decimal point instead of a comma

In ASP.NET with C# I show amounts with a currency sign
I take the currency sign from the culture, (I have different countries so I change the culture according to the
country when I want to show an amount with sign).
Anyhow when I show a EURO sign from some countries in EUROPE  - Netherlands,Belgium and others with culture
like  'nl-NL' or 'nl-BE' and I show it with the C format in the screen

Text='<%# Bind("Amount", "{0,15:C}") %>  
or printing like
 AmountCrdStr = String.Format("{0,15:C}", AmountCrd);

I get the following result:     € 1.500,00

The problem is that I want it to appear like this:  € 1,500.00
first the comma , and then the decimal fullstop.
Although I guess this is what accepted in EUROPE I need to show it in this way.
Is their a culture that shows the amount with the currency sign on the left and a comma sign?
I need an urgent answer
Thankyou
Anat
0
ANAT2403
Asked:
ANAT2403
  • 2
  • 2
  • 2
  • +1
1 Solution
 
nepaliCommented:
hi,
can you check this example from msdn
public static void Main() {

      // Gets a NumberFormatInfo associated with the en-US culture.
      NumberFormatInfo nfi = new CultureInfo( "en-US", false ).NumberFormat;

      // Displays a value with the default separator (",").
      Int64 myInt = 123456789;
      Console.WriteLine( myInt.ToString( "C", nfi ) );

      // Displays the same value with a blank as the separator.
      nfi.CurrencyGroupSeparator = " ";
      Console.WriteLine( myInt.ToString( "C", nfi ) );
}

0
 
Bob LearnedCommented:
That wouldn't give you the EURO symbol for currency.  You would need to set the CurrencySymbol:

        NumberFormatInfo nfiUS = new CultureInfo( "en-US", false).NumberFormat;
        NumberFormatInfo nfiIE = new CultureInfo("en-IE", false).NumberFormat;
        nfiUS.CurrencySymbol = nfiIE.CurrencySymbol;

Bob
0
 
peterdunganCommented:
&euro; {0:0,0}
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Bob LearnedCommented:
@peterdungan:
Huh?

Bob
0
 
peterdunganCommented:
I used that as the dataformatstring setting on a gridview displaying € 1,500 etc

DataFormatString="&amp;euro; {0:0,0}"

(where &amp = "&" & "amp" concatenated)

Culture setting on the system is as follows, incidentally:
<globalization uiCulture="en-IE" culture="en-IE"/>

0
 
nepaliCommented:
The sample from msdn just illustrates the numeric formatting in currency conversion. Its upto you which culture you use to get the currency symbol.

0
 
ANAT2403Author Commented:
The most important thing I learned from you and is waht I was looking for is the culture that shows comma , instead of the . stop whic is "en-IE" the culture of Ireland. and this wrote TheLearnedOne .
before I five the points I wuold like to ask id there is a way of forcing a specific culture let's say another culture not
the EURO to change the sign symbol of , or . and also the place of the currency sign to be from left or right. for example the euro sign of spain is in the left side.
thankyou
Anat
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now