Click here to Skip to main content
15,922,325 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Insert from GridView to DetailsView record Pin
minhpc_bk17-Jun-06 20:48
minhpc_bk17-Jun-06 20:48 
GeneralRe: Insert from GridView to DetailsView record Pin
kmeyer19-Jun-06 0:42
kmeyer19-Jun-06 0:42 
GeneralRe: Insert from GridView to DetailsView record Pin
minhpc_bk19-Jun-06 16:40
minhpc_bk19-Jun-06 16:40 
GeneralRe: Insert from GridView to DetailsView record Pin
kmeyer19-Jun-06 20:35
kmeyer19-Jun-06 20:35 
QuestionEmail validation Pin
Uma Kameswari15-Jun-06 18:48
Uma Kameswari15-Jun-06 18:48 
AnswerRe: Email validation Pin
Suamal15-Jun-06 19:10
Suamal15-Jun-06 19:10 
GeneralRe: Email validation Pin
Uma Kameswari15-Jun-06 19:52
Uma Kameswari15-Jun-06 19:52 
AnswerRe: Email validation Pin
psid2315-Jun-06 19:22
psid2315-Jun-06 19:22 
You can also try this piece of code.
Assumptions:
1. Your Windows form has a text box with the name txtEmailID
2. You have using System.Text.RegularExpressions at the top of your form.
3. Call the ValidateEmail function in the event where you want to validate the email id.
private bool ValidateEmail()
{
bool checkFlag = false;
string EmailID = txtEmailID.Text.Trim();
if (EmailID != "")
{
Regex regex = new Regex(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*");
Match match = regex.Match(EmailID);
if (match.Length == EmailID.Length)
{
checkFlag = true;
}
else
{
MessageBox.Show("Enter a valid email-id");
checkFlag = false;
txtEmailID.Focus();
}
}
else
{
MessageBox.Show("Enter Email ID");
txtEmailID.Focus();
}
return checkFlag;
}


All the best.
Siddharth P Smile | :)
GeneralRe: Email validation Pin
Uma Kameswari15-Jun-06 20:01
Uma Kameswari15-Jun-06 20:01 
Question.net Pin
surshbabuk15-Jun-06 18:19
surshbabuk15-Jun-06 18:19 
AnswerRe: .net Pin
surshbabuk15-Jun-06 18:20
surshbabuk15-Jun-06 18:20 
GeneralRe: .net Pin
surshbabuk15-Jun-06 18:22
surshbabuk15-Jun-06 18:22 
AnswerRe: .net Pin
surshbabuk15-Jun-06 18:21
surshbabuk15-Jun-06 18:21 
GeneralRe: .net Pin
surshbabuk15-Jun-06 18:22
surshbabuk15-Jun-06 18:22 
AnswerRe: .net Pin
minhpc_bk15-Jun-06 23:43
minhpc_bk15-Jun-06 23:43 
QuestionEmail SMTP settings. [modified] Pin
Kenzy8615-Jun-06 16:52
Kenzy8615-Jun-06 16:52 
QuestionRandom password generation Pin
pitturamakrishna15-Jun-06 11:25
pitturamakrishna15-Jun-06 11:25 
AnswerRe: Random password generation Pin
Elina Blank15-Jun-06 12:23
sitebuilderElina Blank15-Jun-06 12:23 
AnswerRe: Random password generation Pin
Mircea Grelus15-Jun-06 12:51
Mircea Grelus15-Jun-06 12:51 
QuestionNewbie: Questions on datagrid, editing and datbinding Pin
leckey15-Jun-06 10:24
leckey15-Jun-06 10:24 
QuestionTrouble accessing a non-secure custom error page from a secure page. Pin
vic0215-Jun-06 7:38
vic0215-Jun-06 7:38 
QuestionCode for retrieving multiple files Pin
priyankardatta15-Jun-06 6:35
priyankardatta15-Jun-06 6:35 
QuestionHow to get data into the dropdown list from database table(c#) Pin
pitturamakrishna15-Jun-06 5:08
pitturamakrishna15-Jun-06 5:08 
AnswerRe: How to get data into the dropdown list from database table(c#) Pin
albCode15-Jun-06 5:11
albCode15-Jun-06 5:11 
AnswerRe: How to get data into the dropdown list from database table(c#) Pin
varshavmane15-Jun-06 5:34
varshavmane15-Jun-06 5:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.