Header Ads

Counting Number of site visitors


// Code  application _start event in Global.asax
        Application.Lock();
        Session["NoOfUsers"] = 0;
        Application.UnLock();
// Code that runs when a new session_start event in Global.asax
        Session["NoOfUsers"]= Convert.ToInt32(Session["NoOfUsers"]) + 1;

No comments:

Powered by Blogger.