Click here to Skip to main content
11,496,146 members (51,578 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
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

Thanks
Posted 31-Dec-12 3:14am
Comments
__TR__ at 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.
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
  Permalink  
v2
Save the generated code in your database.
  Permalink  

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

  Print Answers RSS
0 Dnyaneshwar@Pune 692
1 CHill60 318
2 RyanDev 230
3 Sascha Lefèvre 205
4 OriginalGriff 171
0 Sergey Alexandrovich Kryukov 10,372
1 OriginalGriff 8,871
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600


Advertise | Privacy | Mobile
Web01 | 2.8.150520.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