c# - How can I get the client side date and currency formats? -
I want to display the amount of dates and currency in my chosen formats.
How can I remove it from the client machine
thanks
Alternatively, is there any other way of formatting date / currency correctly ?
Thanks
A browser exposes its location: > ** ** can be retrieved by using thread.CurrentThread.CurrentUICulture **
Read more about this and
Culture can overwrite (if you select another language from the menu)
To format date time and read the string
Set up culture, if you set it for long, then see, resource files will belong to those previously selected culture.
To set the initial level in the culture, you can create a base sheet (which is inherited in the frontline) {}
using System.Globalization; Using System.Threading; Using System.Web.Mvc; Namesphere NerdDinner.Views {public class NerdDinnerViewPage & lt; T & gt; : View Page & lt; T & gt; Where t: class {safe override zero initializeCulture () {base.InitializeCulture ()); Thread.contentFred.CurrentCulture = Thread.CourtTrade.Certaint Culture Clone () culture as Infocain; If (thread.contentrath.contentculture! = Null) {thread.contreffd.archant culture.numberformat.currencyDecalShipter = ".";; Thread Present. }}}}
page
& lt;% @ page title = "" language = "c #" masterpagefile = "~ / view / share / Site. Master "Inherits =" Nerd Dinner. View the Nord Deaner View Page & Nbsp; & Nbsp; Nord Diedter.Model.DinnerFormewyModel & gt; "& Gt%; Here is the full example, but I have copied the code for ease: Another approach is using global Essex which can be found < / P>
Comments
Post a Comment