generate a referral link for user when they register

I have a user table where each user register , when each user register I want to send email to them automatically which include their referral link URL + user id. When another user user link register with the link I want to increment the first user count.

Use the Email_Sending server event to modify the email content and add whatever you want.

Thanks, but what i want to achieve further is when another new user register through the referral link the original poster score should be 2 and the new user that register under him will have score 1 and referral link will be sent to his email also, the more user register on any user link the more score count increase. just like referral system

You can add codes to the server events to handle your referral code. Assuming your referrer is passed in the email as: register?refer=xxx, you need to:

  • get the referrer from the query string parameter
  • locate the refer user and update the count accordingly

I am new to asp.net maker that’s why I am asking , the code I am to write server event is it JavaScript, if yes how can JavaScript code be use inside .net backend code? and how will my code understand that he need to perform the function is it a global function that when write anywhere in the server event it will work for the task irrespective of the location, and is there any sample code one can utilize for different function that I need to perform because I am not a programmer.Thanks

You can read help file topic “Server Events and Client Scripts” as a start.