help on textbox to accept numbers only ...thanks
lloydsbackyard
0
Light Poster
Recommended Answers
Jump to PostPrivate Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click Dim str As String = Trim(TextBox1.Text) If Not Regex.Match(str, "^[0-9]*$", RegexOptions.IgnoreCase).Success Then MsgBox("Please enter Numbers text only.") Else MsgBox("O.K") End If End Sub
Sorry this was forvb.net
All 3 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.