开发者

How to set the format of dates in a web appication

i would like to set the date format of all the dates in my web application in a central location.

i mean if the website is opened in USA it will have a format such as

3/19/2010 (March/19/2010)

while in Italy will be

19/3/2010 (19/March/2010)

i am no re开发者_运维知识库ally concerned with how to locate the users but indeed on how to set the different date format for the whole application in one single location in c#.NET

thanks


You can do this in the web.config file, using the globalization element:

Example:

<configuration>
   <system.web>
      <globalization culture="it-IT" />
   </system.web>
</configuration>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜