Quote:
user id textbox is autofill
That is because the application knows the relation between this UUID and the user who generated this link.
Quote:
i have tried request.querystring
Yes, that is the approach to capture any query string parameters passed to the URL. In this case,
uid
.
Quote:
but it didnot work and i can't understand how can i use this.
This is because perhaps the database does not contain any reference to this value. Note that this value is specific to the application that generated the UUID.
Secondly, a
TextBox
is only going to show a user id entered if your application adds the value to it.
TextBox
does not know the relation between the UUID and the user profile.
Here is a workflow for this:
- Capture the UUID from the query string.
- Query the database to find if a referral code with this UUID exists.
- If it does, then get the user id and input that in the TextBox.
- If it does not, then show the error message stating this code is invalid.
As you might guess, you need to create a database table for this record. This can be a starter schema for the table:
ReferralCodeId | Referee | CreatedOn
1234 | 4321 | January 20, 2020
Then you can create a separate table that contains the records of the consumption of this code. But you get the idea.