Currency issue

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/14/2010 11:46:25 PM
Gravatar
Total Posts 9

Currency issue

Hi,

I'm having an issue with currency display. I have a repeater with some data showing Cost field which i bind like this:

Text='<%# DataBinder.Eval(Container.DataItem, "ApproxCost","{0:c}")%>'

For some reason it is displayed in british pounds. Like this.... £2,000.00

I'm assuming that the culture is read from "globalization culture="auto:en-US" in web.config.

Anyone help would be greatly appreciated.

Thanks,

Peter

4/15/2010 6:40:46 AM
Gravatar
Total Posts 18439

Re: Currency issue

Hi,

By default the culture used is determined by the browser language as discussed on the localization page, it is also possible to force a specific culture as described at the bottom of that page, however, for currency the best way is to make it use the currency specified in the commerce tab in site settings.

You can find code examples of how I do this in WebStore.UI/WebStore/Controls/ProductListControl.ascx/.cs

Hope it helps,

Joe

4/15/2010 8:04:43 PM
Gravatar
Total Posts 9

Re: Currency issue

Thank you Joe,

I'm sorry I absolutely missed this....for some reason my preferred language in Firefox was set to en-gb

 

Thanks again,

Peter

You must sign in to post in the forums. This thread is closed to new posts.