First of all, you can start with a counter to make sure that with the help of Mutex / lock, which returns unique incremental numbers, you save the last number on your website, possibly in web.config, possibly in a database or in a file.
Then you convert this unique number to another base number, for example, to base-64. Here are some codes and details on how you can do this.
stack overflow
And you can get results like
value: 0 encoded: A value: 1 encoded: B value: 9999999999 encoded: SrYsNt value: 4294965286 encoded: ZNGEvT value: 2292964213 encoded: rHd24J value: 1000000000 encoded: TrNVzD
Now, if you scramble a card into characters, you can also make it not so easy to find a number.
Aristos
source share