Click here to Skip to main content
11,926,429 members (55,169 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET
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

Posted 31-Dec-12 3:14am
__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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Save the generated code in your database.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 1 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100