Hi,
I now have the same issue but this time on a version 4.
I tried to solve it in the same way as I did in version 3 by adding these lines in global.asax:
protected void Application_BeginRequest(Object sender, EventArgs e)
{
System.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalDigits = 0;
}
but then I get the result below when I try to open the site.
Should I use a different approach? As before I just want to display the currency amounts with 0 decimals.
/GG
Server Error in '/Direct/PublicStore' Application.
Instance is read-only.
Description: An
unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.
Exception Details: System.InvalidOperationException: Instance is read-only.
Source Error:
Line 58: protected void Application_BeginRequest(Object sender, EventArgs e) Line 59: { Line 60: System.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalDigits = 0; Line 61: Line 62: }
|
Source File: c:\data\dev\hermes\Direct ecf base 4.0.10\PublicStore\Global.asax Line: 60
Stack Trace:
[InvalidOperationException: Instance is read-only.] System.Globalization.NumberFormatInfo.set_CurrencyDecimalDigits(Int32 value) +68 ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in c:\data\dev\hermes\Direct ecf base 4.0.10\PublicStore\Global.asax:60 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
|
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210