read url c#

 

using System.Net;
using System.Windows.Forms;

string url = "http://www.com";
string result = null;

try
{
    WebClient client = new WebClient();
    result = client.DownloadString( url );
}
catch (Exception ex)
{
    // handle error
    MessageBox.Show( ex.Message );
}
posted @ 2011-05-11 03:25  greencolor  阅读(195)  评论(0编辑  收藏  举报