Click here to Skip to main content
Rate this: bad
good
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
 
Thanks
Posted 31-Dec-12 2: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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Save the generated code in your database.
  Permalink  
Rate this: bad
good
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.
Thanks
  Permalink  
v2

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



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