i have a 1 textbox namely txtplate. I want the textbox that can input only Plate number. (example WXY 123 (with space and the 3 letters are in uppercase)
jontennyeah
-1
Light Poster
Recommended Answers
Jump to PostIf you're using WinForms, you could use the MaskedTextBox control.
Jump to PostAlternately, if you are using WPF - You can download a toolkit that will allow you to create one using XAML.
The article for declaring it can be found here.
Jump to PostThese methods are the easiest.
The alternate way would be to capture each character inserted into the textbox, check it, then submit it.
You would have to set the size limit of the textbox also.
Jump to PostWhy do all this extra coding? Masked textbox has it all built in...
All 14 Replies
nmaillet
97
Posting Whiz in Training
Begginnerdev
256
Junior Poster
jontennyeah
-1
Light Poster
Begginnerdev
256
Junior Poster
TnTinMN
418
Practically a Master Poster
ome2012
2
Junior Poster in Training
jontennyeah
-1
Light Poster
ome2012
2
Junior Poster in Training
brylle
-2
Junior Poster in Training
brylle
-2
Junior Poster in Training
ome2012
commented:
kljkljkljklj
+3
nmaillet
commented:
Looks like you just copy and pasted a (incorrect) solution someone had given you, without any thought or testing. It's very buggy.
-1
nmaillet
97
Posting Whiz in Training
jontennyeah
-1
Light Poster
nmaillet
97
Posting Whiz in Training
G_Waddell
131
Posting Whiz in Training
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.