[Solved] Auto Generate a ProductID along with a Sting Prefix in MVC [closed]
I Used Random function in MVC, and Solved this Problem With Following : Firstly created a random String Generator: private static Random random = new Random(); public static string RandomString(int length) { const string chars = “ABCDEFGHIJKLMNOPQRSTUVWXYZ”; return new string(Enumerable.Repeat(chars, length) .Select(s => s[random.Next(s.Length)]).ToArray()); } Then created a random Number Generator: public static int randomNoGenerator() … Read more