Trying to create a random string, x characters in length using 0-9 and a-z/A-Z and can\'t seem to find a good example, any ideas?
If you are using SQL database you can generate a PrimaryKey like this:
SELECT NEWID() as KeyValue
It's very good way and also very secure.