views:

18

answers:

1

Hi I am new to web programming and I have an mvc app which runs on azure. There is a functionality where users can export grid data to csv and one of the fields is a datetime field. When the user clicks on export I take whatever is in the grid, format it to csv and then return a FileContentResult. The problem I have is that since the construction of the csv is happenning on the server, the dateformat is formatted to be en-US since I guess thats the VMs setting. I need to however use the users datetimeformat. Is there a way I can achieve this

A: 

You can get client culture from the header. Take a look at HttpContext.Current.Request.Browser

Jakub Konecki