Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 23rd, 2009, 12:05 PM
Registered User
 
Join Date: Sep 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default chapter4

email is nt working for me...showing error as must be in the format of [email protected] if i gave the right format....thanks
 
Old September 23rd, 2009, 12:15 PM
Registered User
 
Join Date: Sep 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter4 Email Validations...

//Email is required
if (Email.Trim().Length == 0)
{
validationErrors.Add("The email address is required.");
}
else
{
if (entUserAccountData.IsDuplicateEmail(db, ID, Email))
{
validationErrors.Add("The email address must be unique.");
}
else
{
if (Email.IndexOf("@") < 0)
{
validationErrors.Add("The email address must contain the @ sign.");
}
else
{
string[] emailParts = Email.Split(new char[] { '@' });
if ((emailParts.Length != 2) ||
(emailParts[0].Length < 2) ||
(emailParts[1].ToUpper() != "V2.COM"))
{
validationErrors.Add("The email address must be in the format [email protected]");
}

}
}
}
}
i'm getting error as email must be in the format [email protected] anyone help me
Thanks in Advance
 
Old January 3rd, 2010, 02:45 PM
Authorized User
 
Join Date: Nov 2009
Posts: 31
Thanks: 3
Thanked 0 Times in 0 Posts
Unhappy boby

I am getting the same error. I commented and deleted the validation lines and recompiled. Created new virtual directory. But same error no Idea why it is still showing same error. Did you solved it
I tried code for 5th chapter only...
thanks,
 
Old January 5th, 2010, 06:29 PM
Authorized User
 
Join Date: Nov 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default What email address are you passing in

You can put a break point in your code where the code is
string[] emailParts = Email.Split

Hold the Ctrl button and hit the F9 key. A red mark appears on the left margin.

Run the app in Debug mode.

When the app get's there ...mouse over the Email to see what it contains.
The message is displayed if any of the tests is true
//the array length 2 is not
//there are not at least 2 char to the left of the @symbol
//the emailParts does not use the correct website...your code
test that it matches V2.COM
 
Old January 6th, 2010, 05:19 AM
Authorized User
 
Join Date: Nov 2009
Posts: 31
Thanks: 3
Thanked 0 Times in 0 Posts
Default I solved it

I removed the dlls from bin directory and recompiled. It was using the old one no idea why... thanks for your reply.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter4, check RABARBAR BOOK: Beginning SQL 1 July 24th, 2008 01:46 PM
Chapter4 - Raising Event KellyR Access VBA 0 June 11th, 2007 08:50 PM
chapter4 xsl and xpath problem clinfix BOOK: Professional Ajax ISBN: 978-0-471-77778-6 1 August 8th, 2006 02:21 PM
Try it out chapter4 p112 chochadoobie BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 February 9th, 2006 02:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.