Answers for "input only allow numbers and letters"

C#
0

windows form textbox only allow numbers

private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
    {
        e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
    }
Posted by: Guest on July-12-2021
0

allow only numerics and few alphabets in input type js

function allowAlphaNumericSpace(thisInput) {
  thisInput.value = thisInput.value.split(/[^AN0-9/]/).join('');
}
Posted by: Guest on March-31-2021

Code answers related to "input only allow numbers and letters"

C# Answers by Framework

Browse Popular Code Answers by Language