title: How to autogenerate and increment Customer ID using C# in Asp.NET?
body: <p>I neet to generate customer id on clicking the submit button in a registration form which should also be stored along with customer details in SQL database.The problem is it generates for the first id 1 and then 2,after that it remains at customer id no 2 itself.and i want it in the following format : Current Year(4 digits)+Current Month(2 digits)+Number(4 digits), eg:2015120001 but I'm getting it as 2015121.. I have tried the following code to generate the id..pls check the link <a href="http://i.stack.imgur.com/7gwju.jpg" rel="nofollow">Code to generate the id</a></p>