I am new to the programming and I have one concern when I am trying to read my html page content. I am not getting complete data but when I am saving the page with right click save as option I get complete data. NOTE: and inspect element also I am not able to see all data(I am able to see what I read using c#)
How can I read complete data using programming? Please help me to overcome this and following is my code:
private void button1_Click(object sender, EventArgs e)
{
string urlAddress = "http://iris-rmds.tomtomgroup.com
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(urlAddress);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
if (response.StatusCode == HttpStatusCode.OK)
{
Stream receiveStream = response.GetResponseStream();
StreamReader readStream = null;
if (response.CharacterSet == null)
{
readStream = new StreamReader(receiveStream);
}
else
{
readStream = new StreamReader(receiveStream, Encoding.GetEncoding(response.CharacterSet));
}
string data = readStream.ReadToEnd();
textBox1.Text = data;
MessageBox.Show(data.ToString());
//var msg = "Hello world!";
//MessageBox.Show(msg);
Clipboard.SetText(data);
response.Close();
readStream.Close();
}
}