Okay. Let me tell you the logic.
When you are done with registration, you save the data in database and have one column
isActivated
(
Boolean
) set to 0. That means it is inactive.
Now, when you insert the data in
Users
Table, you get one new
UserId
generated for that registration. So, encrypt that
ID
using some
Encryption logic and formulate one
URL
like below...
String URL = "http://wwww.yourwebsite.com/useractivation.aspx?UserId= " + encryptedUserId;
Send this link to the
User by mail.
On the page
useractivation.aspx
, read the
QueryString
UserId
and query to the
Users
Table to check if User is activated or not. If not activated, then activate the
User
by setting the column
isActivated
to 1.