پست اطلاعات
HttpWebRequest httpWReq = (HttpWebRequest)WebRequest.Create(@"http:\\domain. com\page.asp"); ASCIIEncoding encoding = new ASCIIEncoding(); string postData = "username=user"; postData += "&password=pass"; byte[] data = encoding.GetBytes(postData); httpWReq.Method = "POST"; httpWReq.ContentType = "application/x-www-form-urlencoded"; httpWReq.ContentLength = data.Length; using (Stream stream = httpWReq.GetRequestStream()) { stream.Write(data,0,data.Length); } HttpWebResponse response = (HttpWebResponse)HttpWReq.GetResponse(); string responseString = new StreamReader(response.GetResponseStream()).ReadToE nd();