protected void uxGenerateIDButton_Click(object sender, EventArgs e) { string id = ""; int valueOfA = Char.ConvertToUtf32("A", 0); for (int i = 0; i < DefaultCouponLength; i++) { int random = RandomUtilities.RandomNumber(35); if (random < 10) { id += random.ToString(); } else { id += Char.ConvertFromUtf32(valueOfA + random - 10); } } uxCouponIDText.Text = id; }