title: Posting data to a form using HttpWebRequest won't work
body: <p>I have create a <a href="https://docs.google.com/spreadsheet/ccc?key=0AipeKMUl_c57dDYyM0MxQUYzZnAwTGFfeFA0VG9VVUE" rel="nofollow">form</a> here and try to post data in it using httpwebrequest. data is not submitted into this <a href="https://docs.google.com/spreadsheet/ccc?key=0AipeKMUl_c57dDYyM0MxQUYzZnAwTGFfeFA0VG9VVUE#gid=0" rel="nofollow">spreadsheet</a> and i don't know why</p>
  
  <pre><code>    private const string PostURI = "https://docs.google.com/spreadsheet/formResponse?formkey=dDYyM0MxQUYzZnAwTGFfeFA0VG9VVUE6MQ&amp;amp;ifq";
  
      static void Main(string[] args)
      {
  
  
          BeginGetRequestExample();            
          Console.Read();
      }
  
      private static void BeginGetRequestExample()
      {
          var request = (HttpWebRequest)HttpWebRequest.Create(PostURI);
          request.ContentType = "application/x-www-form-urlencoded";
          request.Method = "POST";
          request.BeginGetRequestStream(new AsyncCallback(GetRequestCallback), request);
      }
  
      private static void GetRequestCallback(IAsyncResult asynchronousResult)
      {
          HttpWebRequest request = (HttpWebRequest)asynchronousResult.AsyncState;
  
          using (var postStream = request.EndGetRequestStream(asynchronousResult))
          {
              string postData = "entry.0.single=testdata";
              byte[] byteArray = Encoding.UTF8.GetBytes(postData);
              postStream.Write(byteArray, 0, postData.Length);
          }
  
      }
  </code></pre>