how to convert string to double with proper cultureinfo
- by Vinay Pandey
Hi All,
I have two nvarchar fields in database to store the DataType and DefaultValue,
I have a DataType Double and value as 65.89875 in english format.
Now I want the user to see the value as per the selected browser language format (65.89875 in English should be displayed as 65,89875 in german). Now if the user edits from german format to 65,89875 which is 65.89875 equivalent in english, and the other user views from english browser it comes as 6589875.
This happens because in DB it was stored as 65,89875 and when converted using english culture it becomes 6589875 since it considers , as seperator.
Any Idea how I get this working for all the browsers?