Dear
I have a text box which I want to contain only numbers and put comma for decimal (not dot).
I just use this code on Event Keypress:
if (char.IsNumber(e.KeyChar))
{
}
else
{
e.Handled = e.KeyChar != (char)Keys.Back;
}
This code allows only numbers. It does not match my needed.
How can I do that to allow only number and comma for decimal?
I would appreciate thanks for those solution.
Thank so much.

Rafnas T PRank #280 · 8.8K reputationPosted Apr 4, 2018, 4:10 AM EDT
Satish Kumar VadlavalliRank #1,134 · 1.6K reputationPosted Apr 4, 2018, 3:35 AM EDT
Rafnas T PRank #280 · 8.8K reputationPosted Apr 4, 2018, 4:08 AM EDT