View Single Post
Old July 9th, 2007, 04:29 AM
DZukiewicz DZukiewicz is offline
Authorized User
Join Date: Dec 2004
Location: Swindon, Wilts, United Kingdom.
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to DZukiewicz

The problem with web pages is that global variables are useless, as the page is regenerated on each request.

The best place to store it if you are returning to the same page is in the ViewState, or the Session if you need to persist it across web pages.

As for the reason it work, I am unsure. Normally, the value would stay as 0 as the compiler default it to 0.