DataFormatString currency
DataFormatString currency
DataFormatString currency
DataFormatString currency
DataFormatString currency
DataFormatString currency DataFormatString currency DataFormatString currency DataFormatString currency DataFormatString currency DataFormatString currency DataFormatString currency DataFormatString currency
DataFormatString currency DataFormatString currency
DataFormatString currency
Go Back  Xtreme Visual Basic Talk > > > DataFormatString currency


Reply
 
Thread Tools Display Modes
  #1  
Old 02-23-2015, 07:20 AM
JustinCase2 JustinCase2 is offline
Junior Contributor
 
Join Date: Apr 2006
Posts: 324
Default 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?
Reply With Quote
  #2  
Old 02-24-2015, 05:10 PM
PlausiblyDamp's Avatar
PlausiblyDampDataFormatString currency PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,056
Default

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?
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
DataFormatString currency
DataFormatString currency
DataFormatString currency DataFormatString currency
DataFormatString currency
DataFormatString currency
DataFormatString currency DataFormatString currency DataFormatString currency DataFormatString currency DataFormatString currency DataFormatString currency DataFormatString currency
DataFormatString currency
DataFormatString currency
 
DataFormatString currency
DataFormatString currency
 
-->