I need to POST data to a url in the middle of a script.
process.asp: I need to PO
You can do it by many way. With WebClient
WebClient Client = new WebClient ();
Client.DownloadFile("http://www.stackoverflow.com/myfile.html", "myfile.html");
Or you can put the data in a stream to use it in your program:
WebClient Client = new WebClient ();
Stream strm = Client.OpenRead ("http://www.stackoverflow.com/myfile.htm");
But I do prefer use HttpWebRequest:
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create("http://www.stackoverflow.com/myfile.html");
StreamWriter myWriter = new StreamWriter(objRequest.GetRequestStream());
I prefer the second one because you can have more option for POST/GET or for Cookie.