title: How to send a FormCollection in the POST method in C #?
body: <p>This is the code I have, but I only send String, how do I change it to send a FormCollection?</p>
  
  <pre><code>public String peticionUrlPost_2(String url, FormCollection parametro)
  {
  HttpWebRequest HttpWRequest = (HttpWebRequest)WebRequest.Create(url);
  HttpWRequest.Credentials = CredentialCache.DefaultCredentials;
  HttpWRequest.Headers.Set("Pragma", "no-cache");
  HttpWRequest.Timeout = 300000;
  HttpWRequest.Method = "POST";
  HttpWRequest.ContentType = "application/x-www-form-urlencoded";
  
  byte[] PostData = System.Text.Encoding.ASCII.GetBytes(parametro);
  
  HttpWRequest.ContentLength = PostData.Length;
  Stream tempStream = HttpWRequest.GetRequestStream();
  tempStream.Write(PostData, 0, PostData.Length);
  
  HttpWebResponse response = (HttpWebResponse)HttpWRequest.GetResponse();
  Stream receiveStream = response.GetResponseStream();
  
  StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
  String respuesta = readStream.ReadToEnd();
  tempStream.Close();
  
  return respuesta;
  </code></pre>
  
  <p>}</p>