increase number of visitor by view
<p>the number of visitor will increase by click, but every time when i close my browser, the number of visitor never decreased</p>

<p><strong>my testing step</strong></p>

<p>1)click f5 on my browser, number of visitor increased by 1</p>

<p>2)open another browser ,number of visitor increased again, current number of visitor is 2</p>

<p>3)open 1 more browser, total number of visitor now is 3</p>

<p>4)closed 1 broweser, by right the number of visitor should decreased by 1</p>

<p>5)i clicked refresh on opened browser</p>

<p>6)the existed browser should total number of visitor =3</p>

<p>7)total number of visitor never decreased =(</p>

<pre><code>     private static int member = 0;
     private static int visitor = 0;
void Application_Start(object sender, EventArgs e) 
{
    // Code that runs on application startup

    Application["Member"] = member;



   Application["Visitor"]=visitor;




}



void Session_Start(object sender, EventArgs e) 
{
    // Code that runs when a new session is started
    visitor += 1;
    Application.Lock();

    Application["Visitor"] = visitor;

    Application.UnLock();


}
</code></pre>

<hr>

<pre><code>   void Session_End(object sender, EventArgs e) 
{
    // Code that runs when a session ends. 
    // Note: The Session_End event is raised only when the sessionstate mode
    // is set to InProc in the Web.config file. If session mode is set to StateServer 
    // or SQLServer, the event is not raised.


    visitor -= 1;

    Application.Lock();

    Application["Visitor"] = visitor;

    Application.UnLock();




}
</code></pre>
