For the requirement specified in the question, I think a public variable for
AdmnNo
can be declared and its value is incremented in each click of the button as shown below, and the
AdmId
is generated using
string.Format
int AdmnNo = 0;
string AdmnId = string.Format("Adm{0:0000}",++AdmnNo);
Console.WriteLine (AdmnId);