Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to generate invite codes using c# mvc? I need to put invite only functionality in my website. A user can't register my site without an invitation code or link. And invitation code or link should be only generated by me.
Posted

You may create a GUID as invitation code, store it in your DB with the email of whom you send the invitation. When one identifies himself with that email and invitation code, create an account and sign invitation code as deprecated...
 
Share this answer
 
Comments
JBobby 7-Jul-14 5:05am    
how to deprecate the invitation code bro ? should I delete it from the database ?
Kornfeld Eliyahu Peter 7-Jul-14 5:12am    
That's one option, but I think it is better to ad one more column to indicate deprecated invitations...
JBobby 7-Jul-14 7:45am    
how to create GUID randomly , please tell me, then I am done.
Kornfeld Eliyahu Peter 7-Jul-14 8:39am    
Guid guid = new Guid();
 
Share this answer
 
Comments
JBobby 7-Jul-14 4:39am    
peter, I already checked the link..it's using third party complex approach but I want pretty simple one.

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