Solved

EURO currency symbol with decimal point instead of a comma

Posted on 2006-11-30
7
10,023 Views
Last Modified: 2012-05-05
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
Comment
Question by:ANAT2403
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 7

Expert Comment

by:nepali
ID: 18044962
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
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 18045301
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
 
LVL 9

Expert Comment

by:peterdungan
ID: 18045827
&euro; {0:0,0}
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 96

Expert Comment

by:Bob Learned
ID: 18046773
@peterdungan:
Huh?

Bob
0
 
LVL 9

Expert Comment

by:peterdungan
ID: 18046854
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
 
LVL 7

Expert Comment

by:nepali
ID: 18046905
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
 

Author Comment

by:ANAT2403
ID: 18048445
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question