Solved

EURO currency symbol with decimal point instead of a comma

Posted on 2006-11-30
7
9,850 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now