I want generate a auto number in asp.net which must start as Cust. For example Cust/00001
lianpiau
0
Junior Poster
Recommended Answers
Jump to PostTry the following sample:
string finalstr = "Cust/00000"; for (int i = 0; i < 10; i++) { string val = finalstr.Substring(5, finalstr.Length - 5); int newnumber = Convert.ToInt32(val) + 1; finalstr = "Cust/" + newnumber.ToString("00000"); }
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.