title: Global Variable not incrementing on callback functions
body: <p>i am using Webclient to upload data using Async call to a server,</p>
  
  <pre><code>    WebClient webClient = new WebClient();
     webClient.UploadDataAsync(uri , "PUT", buffer, userToken);
  </code></pre>
  
  <p>i've attached DatauploadProgress and DatauploadCompleted Events to appropriate callback functions</p>
  
  <pre><code>        // Upload Date Completed 
          webClient.UploadDataCompleted += new
                  UploadDataCompletedEventHandler(UploadDataCallback2);
  
          // Upload Date Progress
          webClient.UploadProgressChanged += new 
                   UploadProgressChangedEventHandler(UploadProgressCallback);
  </code></pre>
  
  <p>and in the functions i am trying to show some MessageBoxes:</p>
  
  <pre><code>      // Upload Date Progress
       void UploadProgressCallback(object sender, UploadProgressChangedEventArgs e)
      {
          MessageBox.Show( this,"Upload Progress  ,x =" +x);
          x++;
          MessageBox.Show(e.BytesSent.ToString());
      }
  
  
  
          // Upload Date Completed 
       void UploadDataCallback2(object sender, UploadDataCompletedEventArgs e)
      {
  
          MessageBox.Show(this, "Upload Done,x =" +x);
          x++;
          MessageBox.Show(ASCIIEncoding.UTF8.GetString(e.Result));
      }
  </code></pre>
  
  <p>Where x is a global variable, However for some reason x is not getting incremented, and all the message boxes show x=0.. </p>
  
  <p>any explanation would be much appreciated..</p>