I'd like to input numbers in a textbox and format it with a thousand separator and two decimals.
I've tried the Masked Edit with a lot of different masks, but I just can't get it to work.
I found something interesting but I have a problem when I put some numbers in the textbox, the cursor comes always to the left ...
Here is the code:
double text = double.Parse(txt.Text);
CultureInfo culture = CultureInfo.CreateSpecificCulture("fr-FR");
txt.Text = text.ToString("N0", culture);
But when I insert in the textbox for example 2500 I got 02 500 while I want 2 500.
Any suggestions ?