I have a currency textbox , where the currency is in french language (using ‘,’ instead of ‘,’ and vice versa)
I added MaskedEditExtender but automatically it translated the ‘.’ into a space!
Here you are the code:
MaskedEditExtender oMaskedEditExtender = new MaskedEditExtender();
oMaskedEditExtender.ID = "MEE" + txtMoney.ID;
oMaskedEditExtender.TargetControlID = txtMoney.ID;
oMaskedEditExtender.MaskType = MaskedEditType.Number;
oMaskedEditExtender.Mask = "9.999.999.999,99";
oMaskedEditExtender.InputDirection = MaskedEditInputDirection.RightToLeft;
Page.Controls.Add(oMaskedEditExtender);
please inform me if there is another solution for filtering the TextBox for only the french currency
The best way to filter the output text is conclused in two points :-
1-
myTextBox.Text = string.Format(System.Globalization.CultureInfo.GetCultureInfo(“fr-FR”), “{0:c0}”, _value);
Where, _value is a number with any format, then it will be formated in a french cyrrency format
2- Adding the MaskedEditExtender object with the next mask :
MaskedEditExtender.Mask = @”9,999,999,999.99″;