Hello All,
I have a strange problem. The web application is ASP.NET 2.0 and it supports both en-ca and fr-ca cultures. By default, the site is in English but the user has the option to switch to French on the home page. This is the only page where the user can switch languages. We have a custom BasePage class to assign the appropriate Culture and UICulture for each page based on the user's selection on the home page. While we are allowing the culture to supply the number display format (French is 0,00 and English is 0.00), we are expecting English format as the number input format in text boxes (using regular expressions to enforce appropriate decimal places).
On a few pages, there are compare validator controls to check if a number is greater than/less than a particular number or control value. These validators are working well when the page is in English, but failing validation when the page is in French. Here is the validator code:
Note: The ErrorMessage property is dynamically supplied in code.
Thanks in advance,
Mike
I have a strange problem. The web application is ASP.NET 2.0 and it supports both en-ca and fr-ca cultures. By default, the site is in English but the user has the option to switch to French on the home page. This is the only page where the user can switch languages. We have a custom BasePage class to assign the appropriate Culture and UICulture for each page based on the user's selection on the home page. While we are allowing the culture to supply the number display format (French is 0,00 and English is 0.00), we are expecting English format as the number input format in text boxes (using regular expressions to enforce appropriate decimal places).
On a few pages, there are compare validator controls to check if a number is greater than/less than a particular number or control value. These validators are working well when the page is in English, but failing validation when the page is in French. Here is the validator code:
Code:
<asp:CompareValidator runat="server" ID="cpvAmount" ControlToValidate="mtbAmount" EnableClientScript="false" Type="Double" Operator="GreaterThan" ValueToCompare="0" Display="None" ValidationGroup="HSSAAccount" />
Note: The ErrorMessage property is dynamically supplied in code.
Thanks in advance,
Mike