HttpWebRequest request1 = (HttpWebRequest)WebRequest.Create("http://www.xxxxxxxx.aspx"); HttpWebResponse response1 = (HttpWebResponse)request1.GetResponse(); if (response1.StatusCode == HttpStatusCode.OK) { Stream receiveStream = response1.GetResponseStream(); StreamReader readStream = null; if (response1.CharacterSet == null) { readStream = new StreamReader(receiveStream); } else { readStream = new StreamReader(receiveStream, Encoding.GetEncoding(response1.CharacterSet)); } string data = readStream.ReadToEnd(); response1.Close(); readStream.Close(); }
AllowAutoRedirect
false
HttpWebRequest request1 = (HttpWebRequest)WebRequest.Create("http://www.xxxxxxxx.aspx"); request1.AllowAutoRedirect = false; ...
CookieContainer
HttpWebRequest
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)