Please help with this matter. I did not find a solution.
I built a WebForm that allows entering some data (from multiple controls, one TextBox is to contain a number that means a quantity). The WebForm is in ASP.NET 4.0 (with C#).
The WebForm passes all the values from the Controls into a database hosted on a SQL Server 2014 version. Here comes the issue: the web application should run in a German Language environment. (my machine and the others that would access the application).
My issue is that even with the Regional Settings set to German, I still must enter the decimal values with "." decimal points, rather that with "," commas in the Textbox for quantity.
If I enter the decimal values with commas, they get glued in a single integer, rather than going to decimals. e.g. 11123,34 is recorded in the table as 1112324 1123.45 is recorded in the table as 1123,45
Note: I set the field in the database, where this TextBox addresses to "Money" type in the SQL table definition.
When accessing the contents of the table (as written) via a GridView control in another webform, I get all the values with "," commas , irrespective if the Regional Settings are set to German or English.
The format of the numeric values stored for Quantity changes its presentation from "," commas to "." points and viceversa only when running SELECTs on the table directly on the SQL Server (I mean in the SQL Server Management Studio), or when I "SET LANGUAGE TO GERMAN/BRITISH" on the SQL Server.
My question is:
- What should I do that numeric values to be entered the same with "," in the textbox and be processed likewise with "," decimal point in the SQL table.
I do not want users to use the decimal separator of "." when entering the quantity, and use the decimal separator "," when reading the quantity out of the database.
Thank you very much for your help.