HowcanI generate the key,how can it be validated by the app.
How can I generate the key and how can it be validated by the application?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shivanand ArurPosted May 3, 2013, 6:49 AM
public static string GenerateUniqueId()
{
long i = 1;
foreach (byte b in Guid.NewGuid().ToByteArray())
{
i *= ((int)b + 1);
}
return string.Format("{0:x}", i - DateTime.Now.Ticks);
This method will help u fetch a unique ID each time u run it. U can then use this ID and can store it in the database for a particular row. Apply ur logic for validation.
Please mark the answer as accepted if it helped.