Display Currency Symbols using ISO standards in ASP.NET

I stumbled across an interesting question about localization/globalization recently. The user wanted to print currency symbols using the ISO standards and wanted to find out if there was an easy way to do so using ASP.NET


Yes, there is! Use the RegionInfo.ISOCurrencySymbol Property. Here’s how


C#

string symbol = RegionInfo.CurrentRegion.ISOCurrencySymbol;

Response.Write(symbol);

VB.NET

Dim symbol As String = RegionInfo.CurrentRegion.ISOCurrencySymbol

Response.Write(symbol)

The output on my system is USD, which is according to the ISO 4217 standards






About The Author

Suprotim Agarwal
Suprotim Agarwal, Developer Technologies MVP (Microsoft Most Valuable Professional) is the founder and contributor for DevCurry, DotNetCurry and SQLServerCurry. He is the Chief Editor of a Developer Magazine called DNC Magazine. He has also authored two Books - 51 Recipes using jQuery with ASP.NET Controls. and The Absolutely Awesome jQuery CookBook.

Follow him on twitter @suprotimagarwal.

2 comments:

iso 9000 said...

I absolutely adore reading your blog posts, the variety of writing is smashing.This blog as usual was educational, I have had to bookmark your site and subscribe to your feed in ifeed. Your theme looks lovely.Thanks for sharing.
iso 9000

Anonymous said...
This comment has been removed by a blog administrator.