How To Update Application Var in class-method that I start in Thread
Posted on 2011-03-03
My Problem: I need to run a method that constantly updates DB on Application level and alerts clients if there are updates maden, using an Application variabel (a counter) so I
thought, let's set up a Thread in the global.asax, calling the method. But I can't update a Application var in a method (Application does not exist in current context)
in app_code: class CheckIfOpen method: IsOpenForBiding
Thread th = new Thread(new ThreadStart(CheckIfOpen. IsOpenForBiding));
th.IsBackground = true;
But how do I fit in Application["OnSaleCounter"] ???