Hi,
for the count you need to store it somewhere in database.
your code would be something like,
int count = getLastCount() + 1; string str = String.Format("{0}_{1}", TextBox1.Text.SubString(0,4), count.ToString("0000") );
you need code to get last inserted id from database in getLastCount
Hope this will help you,
Thanks
-Amit.