Categories

Thousands of experts bid on your personal project at ScriptLance.com

display the html of a web page

This example will display the html source of a given web page, should be easy to create an app with this if you wished.

using System;
using System.IO;
using System.Net;
using System.Text;

namespace web
{
/// <summary>
/// Summary description for web.
/// </summary>

public class WMI
{
static void Main(string[] args)
{
WebClient MyClient = new WebClient();
Stream MyStream = MyClient.OpenRead(“http://www.google.com”);
StreamReader MyReader = new StreamReader(MyStream);

Console.WriteLine(MyReader.ReadLine());
MyStream.Close();

}
}
}

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

You must be logged in to post a comment.