I am working on an confirmation system, that sends a number back to the user after the process has been complete. What I need is a incrementing counter, that send back the new number. This is what I have so far.
int i = 100;
int Counter = i++;
w.Write(Count);
I want the counter to start at 100, and when the first user uses the system their count number printed to the screen will be 101. The second user will be 102… and so on.
I can get it to increment but the only that displays is 101, it doesn’t save 101 and increment it to 102. Any thoughts?
Save counter into Application vault:
But this data will be lost if application dies by timeout, or another reason why the appropriate app pool becomes recycled.
Thus consider to use a database. Install local SQL Express is quite simple task.
Also there is another thing to consider: if work fails, do you want to count it in?