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
Dmitrij Solov
NA
43
6.6k
masked textbox validation
Oct 29 2016 3:35 PM
Hello, I used to work on the following subject for 3 days.
I have a masked textbox event:
private
void
button4_Click(
object
sender, EventArgs e)
{
maskedTextBox1.Mask =
"999-000-0000"
;
}
//and the validation of this event:
private
void
button5_Validating(
object
sender, CancelEventArgs e)
{
string
text =
this
.Password
//string value
string
pat = @
"^9994714711"
//code to match
Regex itsme =
new
Regex(pat, RegexOptions.IgnoreCase);
Match itsme2 = itsme.Match(text);
if
(itsme2.Success) { }
else
{
MessageBox.Show(
"Something wrong happend, no match"
,
"Error"
);
e.Cancel =
true
;
}
}
I recieve allways Error-Messages
Can somebody help me?
Reply
Answers (
6
)
How to Soften Edges with Feathering in C# like photoshop
Split an array like below.