something likeusing System.IO;
using System.Net;String url = "http://www.domain.com/abc.aspx";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);//if your username and pwd contains special chars, you need to call HttpUtility.UrlEncode to encode the values
string s = "username=abc&pwd=def";
byte[] requestBytes = System.Text.Encoding.ASCII.GetBytes (s);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.ContentLength = requestBytes.Length;
Stream requestStream = req.GetRequestStream();
requestStream.Write(requestBytes,0,requestBytes.Length);
requestStream.Close();HttpWebResponse res = (HttpWebResponse)req.GetResponse();
StreamReader sr = new StreamReader(res.GetResponseStream(), System.Text.Encoding.Default);
String line = streamReader.ReadToEnd();
streamReader.Close();
res.Close();also seeRetrieving HTTP content in .NET
http://www.west-wind.com/presentations/dotnetWebRequest/dotnetWebRequest.htm