Textbox Numeric Input

0
0

In the textbox, the input type number is accepting the letter ‘e’. Is it possible for accepting only numbers 0-9 and decimal and +/-?

  • You must to post comments
0
0

Hi Anz,

You have a few options:

  1. You can use the Filter property to apply a Regex expression to the input of the TextBox.
    1. You can test your expression on a site like this: https://regex101.com/
    2. https://stackoverflow.com/questions/2811031/decimal-or-numeric-values-in-regular-expression-validation
  2. You can use the NumericUpDown control and hide the up / down buttons
    1. https://wisej.com/support/question/hide-the-spinner-for-numeric-updown-control

Let me know if this works for you!

Best regards,

Levie

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.