title: Variables in ASP.NET
body: <p>I recently switched to ASP.NET Web Forms from Windows Forms and I have an issue with something I would not expect. In good Web Forms I could create a field inside my Form class and assign to it. So if I wanted one control to raise a flag on one event (say user button click) I could declare Boolean and assign to it from my form methods. Then I could check the state of the flag from different methods on different events. 
  It looks like it's not so much in Web Forms. The value of my fields (or global variables if you will) remains unchanged from the moment I initialized them.
  This is probably simple thing but for me it's quite a frustrating problem. I could store my vaues in session but I don't think that it would be a right way to do it. The problem is I need to store a lot of variables since I write code for SQL interface applications. Never had a single problem in Windows Forms and in Web Forms I keep pulling my hair.
  Ultimately I need to store objects to reuse them like LINQ to SQL classes objects so I would really appreciate some guidance.</p>