Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   ASP.Net (http://www.xtremevbtalk.com/asp-net/)
-   -   DataFormatString currency (http://www.xtremevbtalk.com/asp-net/327505-dataformatstring-currency.html)

JustinCase2 02-23-2015 07:20 AM

DataFormatString currency
 
Having an issue with using DataFormatString={0:c}, which is currency. It will display the value formatted with the currency of the current locale (Thread.CurrentThread.CurrentCulture). How does that make sence? If I have a value in my database, say 1000, the currency is already set. I can't have some users see it as 1000 and others as $1000. See how that is sortof wrong? I don't see how the currency format is useful... Anyone?

PlausiblyDamp 02-24-2015 05:10 PM

Being able to format a string based on particular locale is massively useful in a lot of situations, it just isn't applicable in this one. In this situation it is probably easier to just hard code the format rather than relying on the user's locale, unless you also want to convert the value into the user's currency and then format it in this way.

Are you formatting other parts of the output into the user's locale?


All times are GMT -6. The time now is 11:57 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.