Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# textboxaccept only numbers

 private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
    {
        e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #textboxaccept #numbers
ADD COMMENT
Topic
Name
1+9 =