You can use the HttpWebRequest class.
use something like this (from my memory) :
HttpWebRequest req =
(HttpWebRequest)WebRequest.CreateDefault(
http://youpage);
Stream s = req.GetResquestStream();
byte[] post = Encoding.ASCII.GetBytes(string.format(
"yourpostvar={0}&yourotherpostvar={1}",
HttpUtility.UrlEncode("The value of your post variable"),
5.ToString()
);
s.Write(raw, 0, raw.Length);
s.Close();
HttpWebResponse resp = req.GetResponse();
Stream respStream = resp.GetResponseStream();
StreamReader sr = new StreamReader(respStream);
return sr.ReadToEnd();
Notice the post variables are string in ASCII encoding. If you require
passing value that are strings, you will have to deal with string
convertion. Use classic .ToString() and .Parse() methods for simple types,
and Convert.ToBase64String() and Convert.FromBase64String() to handle byte
array (which can for example a byte representation of a serialized object in
binary format, or even xml format).
The other issue I met concerned the international chars like éàç. I needed
to encode it into a byte array then passing it in base 64 form, even if the
type was in string format (but there's certainly better ways).
Hope that helps
Steve