>>>I want to store an ID of a tablet (e.g. iPad, Android, etc.) into a local storage of the browser. Then at run-time, my app will get this ID string and use it to get/set certain data on the web server that will "belong" to this or that device. I found some threads on Stackoverflow with sophisticated methods of generating a random string. Since I am dealing with 10 (or 20 at most) devices, I believe, this level of complexity is too much. Can you suggest a simple method of creating/getting a string of about 10 alphanumeric characters, from .net application? For example, "ABC123", "CBGHHD", and so on.
>>
>>I am using this:
>>
>>
>> ' Return a GUID
>> Public Function GetGUID() As String
>> Return Guid.NewGuid.ToString()
>> End Function
>>
>
>Quick search on the web shows that the resulting string is quite long. If I don't find anything else, this should work. Too bad that this function does not have an overload to make the string shorter.
>
>Thank you!
The shorter it is the higher the risk of duplicates. For your purposes (just an ID for a device) the length isn't really a factor. I'd go with GUID......