increment an alpha-numeric number. in c sharp
I am trying to increment an alpha-numeric number. The problem is that the final result doesn't appear in label18
this my code
private void AutoIncrement()
{
var str = label18.Text;
var tempArray = str.Split('/');
string tempId = tempArray[2];
int id = Convert.ToInt32(tempId);
id = id + 1;
string autoId = "LG/SALES/" + String.Format("{0:0000000}", id);
label18.Text = autoId;
}