//環境VS2008,WIN7SP1html
//背景:人人網自動登錄,須要把讀取到的html源代碼顯示出來,web
//test.txt 爲html源代碼orm
private void Form1_Load(object sender, EventArgs e)htm
{string
string str = null;it
StreamReader sr = new StreamReader("D:\\test.txt", Encoding.Default); test
str = sr.ReadToEnd();object
webBrowser1.Navigate("about:blank");coding
webBrowser1.Document.OpenNew(true);im
webBrowser1.Document.Write(str);
}