Click here to Skip to main content
15,895,192 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hiya,

I am using the Create User Wizard provided within Visual Studio to create user accounts for my system and cannot work out how to ensure that both the username and email address are both unique. I have searched online and within a couple of books we have here and can't find the solution.

Can anyone help?

Thanks in advance!
Posted

If you are using the defaults supplied when running aspnet_regsql then a database named aspnetdb is created. Within this there is a table called aspnet_User and within that a column named UserName.

Does this give you any ideas of how to check for unique user names?
 
Share this answer
 
Comments
NandaKumer 18-Jan-12 13:10pm    
good one
Hi Mark,

I have worked out how to check whether the email address is being used by using:

Membership.GetUserNameByEmail(string email);

How would I then prevent the Wizard going on any further if the email address does exist?

Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900