TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
azzo stones
NA
66
0
Validatating user inputs
Sep 11 2011 3:45 PM
hello guys, i have created a form and added 4 textboxes where the user is asked to enter Name, Surname,Id card Number,and telephone Number, i need to do some code so that the user inputs things correctly such as :- only letter are entered in Name and Surname Fields, the Id card must accept eight numbers and a letter in the end the letters accepted should be A or G or M (example:- 45231223 A) and the phone number only numbers . one more thing i want that when ever the user inputs something invalid he gets an error message ?any help guys ?thanks. what i was thinking was something like this
for(int i = 0; i<temp.lenght. i ++){
if (!(char.IsLetter (temp[i])){
else
MessageBox.show(invalid input);
Reply
Answers (
2
)
Install NuGet Extension Manager Visual Studio Express Edition
status output to RichTextBox during a click event