How to create Invoice Number in Text box and auto increment it on button click?
<p>I am using Asp.net(C#), and SQL Server. In web application I want 5 digit Invoice number in text box, and after clicking on button the gridviews data to be saved in database, and then invoice number in the text box should be increment by one...and so on. I used this code =></p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
    double ID = 00001;
    txtinvoiceno.Text = Convert.ToString(ID);
</code></pre>

<p>and </p>

<pre><code>protected void btnsavef1_Click(object sender, EventArgs e)
{
    ID++;
    var no = Convert.ToInt32(ID);
    txtinvoiceno.Text = Convert.ToString(no);
}
</code></pre>

<p>but it shows in the output only single digit 1, and increment it only once time i.e.2, and further increment is not working.</p>

<p>Anyone have any idea on this??</p>

<p>Thanks &amp; Regards,</p>