VB .Net : how to validate textbox to get only alphabets a-z , A-Z...Pls help me
warne 0 Newbie Poster
Recommended Answers
Jump to Postto valid textboxes write the code in keypress event
likeprivate sub textbox1_keypress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles textbox1.KeyPress Dim KeyAscii As Integer KeyAscii = Asc(e.KeyChar) Select Case KeyAscii case 65 to 90 ''for capital ALPHABET A case 97 to122 case else keyascii=0 End …
Jump to PostPrivate Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSearch.TextChanged If Not IsNumeric(.Text) Then MessageBox.Show("please enter a valid string", "Error" _ , MessageBoxButtons.OK, MessageBoxIcon.Information) End If
All 7 Replies
pritesh2010 30 Posting Whiz in Training
warne 0 Newbie Poster
pritesh2010 30 Posting Whiz in Training
krish12 0 Newbie Poster
Sangavi 0 Newbie Poster
Sangavi 0 Newbie Poster
Netcode 33 Veteran Poster
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.