获取用户系统的千位分隔符设置 [英] get user system's thousand separator settings

查看:82
本文介绍了获取用户系统的千位分隔符设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,

我正在使用VS 2005,asp.net,c#
千位分隔符应显示在gridview中.
它应基于区域设置和语言设置中存在的客户端用户系统的千位分隔符设置.
这个怎么做?

提前发送
george

解决方案

阅读httprequest.userlanguages数组
http://msdn.microsoft.com/en-us/library/system. web.httprequest.userlanguages.aspx [ ^ ]
可以设置任何整数或小数

 ToString("  ,CultureInfo.GetCultureInfo(" ))


在美国看到的位置,您可以从httprequest.userlanguages数组中设置一个值

尝试以下操作:

 字符串逗号= System.Threading.Thread.CurrentThread.CurrentUICulture.NumberFormat.NumberGroupSeparator; 


Hi friends,

I am using VS 2005,asp.net,c#
Thousand separators should display in gridview.
It should be based on the client user system''s thousand separator settings present in the regional and language settings.
How to dothis?

tx in advance
george

解决方案

read the httprequest.userlanguages array
http://msdn.microsoft.com/en-us/library/system.web.httprequest.userlanguages.aspx[^]
any int or decimal can be set

ToString("#,0.00", CultureInfo.GetCultureInfo("en-US"))


Where you see en-US you set a value from the httprequest.userlanguages array


Try this:

string comma = System.Threading.Thread.CurrentThread.CurrentUICulture.NumberFormat.NumberGroupSeparator;


这篇关于获取用户系统的千位分隔符设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆