Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
Public Validating Textbox value
JomarMark Tamargo
Jan 13 2016 6:56 AM
374
Reply
Hi
1. Question: How i can valitadate numeric and charater/string value on a textbox using error provider.
sample but i don't try if correct
private bool ValidateAga()
{
bool bStatus = true;
int IsNumeric;
if(int.TryParse(txtAge.Text, out IsNumeric))
{
ErrorPro.SetError(txtAge, "Please enter you age");
bStatus = false;
}
else if(IsNumeric < 22)
{
MessageBox.Show("You enter below age 22", "Message");
}
ErrorPro.SetError(txtAge,"Please enter a valid number");
return bStatus;
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Overloading in C#
Change password access