Are you sure the text field allows as "." and "," as a decimal separator (as opposed to a wildcard, also known as a thousands separator)?
If you are sure that you receive only decimal separators and do not group characters, replace "." on the "." . before using TryParse with InvariantCulture to convert a string to a float.
OR use the same culture in the code as on the client side, so both will use the same decimal separators.
As mentioned above, float has no concept of various decimal separators.
source share