public string AutoGenPickupIDs() { string pickupId = "pid_"; string generatedID = dataAccessObject.AutoGenPickupIDs(); // Get auto-generated ID from AutoGenPickupIDs() method. string[] idString = generatedID.Split('_'); // Split the genrated value at "_". for ex: pid_0 will be splited into pid_ and 0; uint number = uint.Parse(idString[1]); // Will give out the numerical value in the string. number++; pickupId = pickupId + number; return(pickupId); }