Quote:
1. How can I generate the referral url
The example you provided uses
QueryString to pass value. The stuff after the
?
symbol in the
URL
is the query string where
ref
is the
key
and
username
is the
value
.
Quote:
2. How do I make it so that when new user use referral url he will be redirected to registration page to signup under the referral url.
You would simply use the
Request
object to get the value from the
QueryString
. For example:
Request.QueryString["key"]
A quick example based on your need would be:
if(Request.QueryString["ref"] != null)
{
Response.Redirect("~/Signup.aspx");
}