space between CurrencySymbol and value, how?

J

Jeff

hi

asp.net 3.5

System.Globalization.NumberFormatInfo nfi = new
System.Globalization.NumberFormatInfo();
nfi.CurrencyDecimalDigits = 0;
nfi.CurrencyGroupSeparator = "";
nfi.CurrencySymbol = "kr";
litPrice.Text = String.Format(nfi, "{0:c}", price); <<-- price is a
variable of type decimal

when this code is executed, it gives this output:
kr23

instead I would like it to be like this (notice the space between kr and
23):
kr 23

How do I accomplish this?
 
G

Guest

hi

asp.net 3.5

System.Globalization.NumberFormatInfo nfi = new
System.Globalization.NumberFormatInfo();
nfi.CurrencyDecimalDigits = 0;
nfi.CurrencyGroupSeparator = "";
nfi.CurrencySymbol = "kr";
litPrice.Text = String.Format(nfi, "{0:c}", price);  <<-- price is a
variable of type decimal

when this code is executed, it gives this output:
kr23

instead I would like it to be like this (notice the space between kr and
23):
kr 23

How do I accomplish this?

I think you need simply need to set

nfi.CurrencySymbol = "kr ";

Using CultureInfo("da-DK") gives you correct result (kr 23)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top