c# - What is the best layer to use to format Currency numbers? -
I use javascript on foreground, in the form of a medium layer as C # and Oracle 9i DB.
What is the best practice when formatting numbers with 2 decimal precision in any currency? And what should be liked any of these three layers?
Considering that users will be able to edit this amount on some of their screens on the application.
The storage of your decimal can be more than 2 digits. Since you mentioned that C # and Javascript, I can assume that you are using ASP.NET for your front end.
To display the currency, it must be controlled in your ASP.NET code, depending on your user's locale / culture Infos to display it.
For your gridview and other display controls, in C #, you can use string formatting options: {0: c} With 2 decimal places
Comments
Post a Comment