/******************************************************************************************************
* 查看baidu首页html源码的cs代码,ASP.NET入门中。。。
******************************************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
namespace WebRequestorApp
{
class Program
{
static void Main(string[] args)
{
WebRequest req = WebRequest.Create("http://www.baidu.com");
WebResponse resp = req.GetResponse();
StreamReader reader = new StreamReader(resp.GetResponseStream(), Encoding.ASCII);
Console.WriteLine(reader.ReadToEnd());
return;
}
}
}
入手ASP.NET第一个代码
最新推荐文章于 2024-09-10 14:15:01 发布