Email Validation Code
private void button1_Click(object sender, EventArgs e)
{
String ID = txtID.Text;
if ((ID.Count(char.IsDigit) == 9) && (ID.EndsWith("X") || ID.EndsWith("V")) && (ID[2] != '4' && ID[2] != '9'))
{
MessageBox.Show("Valid ID");
}
else
{
MessageBox.Show("Invalid ID");
}
}
NIC Validation Code
private void button1_Click(object sender, EventArgs e)
{
string pattern = null;pattern = "^([0-9a-zA-Z]([-\\.\\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})$";
if (Regex.IsMatch(txtEmail.Text, pattern))
{
MessageBox.Show("Valid Email address ");
}
else
{
MessageBox.Show("Not a valid Email address ");
}
}
Enjoy learning new things and you want to get as good a grip as possible on how things work and best ways to use information technology. Visit my other blogs here:: http://thissasinfobahn.blogspot.com/:: http://thissann.blogspot.com/:: http://thissanetworkz.blogspot.com/
Sunday, November 15, 2015
Subscribe to:
Posts (Atom)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzLTAxgZ2hYiBotPYTM5T1yyVKb-lhqSlv9GtC4HSQLZiRTVCIlBmAu5VQpNOU_IQzvsjp2KpGZ0J48ZM8V9XNOiX7X6Y4Xk74I4MVIcHERpXStA3V5tIchR65w4hI8c9QFP1W2nbl6jT_orxKQwiwHjYvqcJvnZKCIjHS0MmeVZVOj3mZeeqym3Yq/w400-h400/1211.jpg)
-
අංකිත බෙදීම( Digital Divide) තොරතුරු හා සන්නිවේදන තාක්ෂණය මිනිසුන් අතර ප්රචලිත වූවාසේම එම තාක්ෂණය ලොව සැමටම එකම ආකාරයකට බුක්තිවිදිය නොහැක...
-
කළමනාකරණ තොරතුරු පද්ධති ( Management information system) ආයතනයක තොරතුරු ගලායාමේ ව්යුහය සැලකූ විට මූලික මට්ටම් 3 ක් පවතී.ඉන් ඉහලම මට්ටමේ...