title: How to generate product id that contains letter and numbers in c#
body: <p>How can I create a line of code in c# that I will use to give every new product that I add to my product table?I am using MySQL database. 
   This is what I have tried so far although it's not what I really need.</p>
  
  <pre><code>//auto product number
  static string IncrementID(string startValue, int numNonDigits)
  {
      string nonDigits = startValue.Substring(0, numNonDigits);
      int len = startValue.Length - numNonDigits;
      int number = int.Parse(startValue.Substring(numNonDigits));
      number++;
      if (number &gt;= Math.Pow(10, len)) number = 1; // start again at 1
      return String.Format("{0}{1:D" + len.ToString() + "}", nonDigits, number);
  }
  private void Genarate_productcode()
  {
      product_code.Text = IncrementID("QIEpl/PO/0000009", 9); // produces QIEpl/PO/0000010 // C00011 PCI0001
  }  
  </code></pre>