Hi doing a site that displays prices in euro.
it seems to work fine but then sometimes it does not display the euro sign it displays this character ¤
here is the code i am using.
NumberFormatInfo nfi = new NumberFormatInfo();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SetupPage();
}
nfi.CurrencyDecimalDigits = 0;
nfi.CurrencySymbol = "€";
}
/* next bit is in side a method that is called within the page*/
if (CMSContext.CurrentDocument.GetValue("property_price_max") == null)
{
LtrPrice.Text = "Priced " + String.Format(nfi,"{0:c}", decimal.Parse(CMSContext.CurrentDocument.GetValue("property_price_min").ToString()));
}
else
{
LtrPrice.Text = "Priced from " + String.Format(nfi,"{0:c}", decimal.Parse(CMSContext.CurrentDocument.GetValue("property_price_min").ToString())) + "-" + String.Format(nfi,"{0:c}", decimal.Parse(CMSContext.CurrentDocument.GetValue("property_price_max").ToString()));
}