Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all

My requirement is when user registration is completed i am sending mail to that user Confirmatoncode. This confirmation
code is i am generating using Generated() method. If user not getting mail at first time(when user registration is completed)
the user click "resendMail" button this time also mail is going with confirmatincode ..
but second time i want to go same firsttime confirmationcode how to regenerate same firsttime confirmationcode at the
second time. Please send me any one

Thanks
Posted
Comments
__TR__ 31-Dec-12 8:27am    
Assuming the generate() method is generating a random code its highly unlikely that you will get the same code when you call it twice. One option would be to store the code generated the first time and use this stored value to resend the code when user clicks on Resend email button.

Save the generated code in your database.
 
Share this answer
 
I assume you save the user details in database, so save also the generated code. If the user asks to resend email just extract the code from the database.
This also can be used to remind users to activate their account if they haven`t done so.

Please mark the answer if it was helpful.
Thanks
 
Share this answer
 
v2

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