i need to validate the textbox such that in can accept numbers only but the entered no should be greater than 0 , it can be 0.1 and should be less than 101.
akshaya kochare
0
Newbie Poster
Recommended Answers
Jump to PostSubscribe to KeyPress event hander of textBox control and use this code inside of it:
Private Sub textBox1_KeyPress(sender As Object, e As KeyPressEventArgs) 'allows backspace key If e.KeyChar <> ControlChars.Back Then 'allows just number keys e.Handled = Not Char.IsNumber(e.KeyChar) End If End Sub
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.