开发者

Does Application_OnStart in global.asax work with cached pages?

开发者 https://www.devze.com 2023-03-07 12:18 出处:网络
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, w开发者_C百科ill the counter still upd

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, w开发者_C百科ill the counter still update?

Thanks in advance


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消