c# - ASP.Net Core Currency Format Not Working Properly -
while trying display currency attribute [datatype(datatype.currency)]
, using @html.displayfor(model => model.variable)
format not displaying correctly on os x computer while debugging locally. shows ¤ symbol instead of $.
you can set culture info programatically server in startup.cs
public startup(ihostingenvironment env) { cultureinfo.defaultthreadcurrentculture = new cultureinfo("en-us"); var builder = new configurationbuilder() .setbasepath(env.contentrootpath) .addjsonfile("appsettings.json", optional: false, reloadonchange: true) .addjsonfile($"appsettings.{env.environmentname}.json", optional: true) .addenvironmentvariables(); configuration = builder.build(); }
Comments
Post a Comment