ASP application state
<p>I have in file Global.asax in the event Application_Start the code:</p>

<pre><code>{ 
   Application["orderId"]=0
}
</code></pre>

<p>Then I use it in newOrder.aspx.cs in button addOrder_click to increment it and I copy the URL of this project in Visual Studio 2010 and paste it in many pages to see if more than user add new order. It was fine when I try the increment of application["orderId"] in the first page I loaded but when I open another page to act that I another person the database says:</p>

<p>"Cannot insert duplicate key in object 'dbo.theOrder"</p>

<p>Which means application["orderId"] initialize with zero another time.
Sorry for lots of lines and I have trouble with explaining my problem.</p>

<p>Sorry! Help me! Thank you!</p>
