Hello there, I'm struggling with my computing coursework in college and I though I'd ask here for help.
My issue is simple but I can't get it right.
I need to validate the text into a textbox and check that it contains ONLY alphanumeric characters, but it MUST contain both, not either numeric or alphabetic, but some of each.
The textbox should store information about a Street address, that's why both the street Name and the property Number have to be input. Spaces " " and points "." should also be allowed.
If it helps, something like "12" or "St. Davis Street" should NOT pass the validation checks, whereas "St. Davis Street 12" will do.
I would like to get it done with regular expression as I've been using them throughout my work, but I don't mind other solutions.
I'm using Visual Studio 2010 Professional, 4.0 framework and Visual Basic.
Thanks for your time
Cale93
0
Newbie Poster
Recommended Answers
Jump to PostPrivate Sub ButtonInput_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonInput.Click Dim ContainsAlpha As Boolean Dim ContainsNumeric As Boolean Dim ContainsInvalidCharacter As Boolean 'Iterate through each character and determine if its a number, 'letter, or non number of letter. For Each Character As Char In TextBoxStreetAddress.Text …
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.