title: Trying to take user input and write to a file
body: <p>i'm having a problem where I am trying to save the geolocation of an address unto a file.  I am using hidden labels to transfer the information.</p>
  
  <p>on the client side button event I have: </p>
  
  <pre><code>   function save() {
          document.getElementById("hidLat").value = y;
          document.getElementById("hidLon").value = x;
          &lt;% saveAddress s = save(); %&gt;
     }
  </code></pre>
  
  <p>and in c# I have:</p>
  
  <pre><code>   protected saveAddress save()
     {
          saveAddress s = new saveAddress();
          s.latitude = hidLat.Value;
          s.longitude = hidLon.Value;
  
          using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\\savedAddresses.txt", true))
          {
              file.WriteLine(s.latitude + " " + s.longitude);
              file.Close();
          }  
  
          return s;
     }
  </code></pre>
  
  <p>When I click on the button the file is created but nothing is saved into it.
  Am I doing this right or is there a better way to try and write the user input into a file?</p>