Click here to Skip to main content
15,913,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to make email verification link during registration and send it to registered email address ? Only if user clicks on that link his accounts gets activated otherwise not.
Posted

 
Share this answer
 
Comments
jayraj86 6-Apr-14 5:36am    
I saw 2nd link but i have not used stored procedure,I used default sql server of visual studio. so what changes i should made in that code ?
Okay. Let me tell you the logic.

When you are done with registration, you save the data in database and have one column isActivated (Boolean) set to 0. That means it is inactive.

Now, when you insert the data in Users Table, you get one new UserId generated for that registration. So, encrypt that ID using some Encryption logic and formulate one URL like below...
C#
String URL = "http://wwww.yourwebsite.com/useractivation.aspx?UserId= " + encryptedUserId;

Send this link to the User by mail.

On the page useractivation.aspx, read the QueryString UserId and query to the Users Table to check if User is activated or not. If not activated, then activate the User by setting the column isActivated to 1.
 
Share this answer
 
Comments
jayraj86 6-Apr-14 6:01am    
can you please provide code for this ?
I can't and I don't have. Please do it yourself by following the logic. If you face any specific issue, then come back on Code Project and add another question explaining the problem. Please understand that we are here to help and guide you, not to provide you code.

Please accept this answer, if it helped you.

Thank. :)

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