Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Application_OnStart in global.asax work with cached pages?

I'd like to implement a counter in global.asax so I can do a giveaway on my site every xxx visits. The question is, if my page is served from the ASP.NET cache, will the counter still update?

Thanks in advance

like image 463
Phil Avatar asked May 19 '11 11:05

Phil


1 Answers

Application_OnStart this event fires only once when you application started. To implement counter you should use Session_Start event. In this event increment counter.

like image 194
jams Avatar answered Oct 23 '22 16:10

jams