// 环境VS2005,WinXPSP2 // test.txt 为html源代码 20 private void Form1_Load( object sender, EventArgs e) 21 ... { 22 string str = null; 23 StreamReader sr = new StreamReader("D://test.txt", Encoding.Default); 24 webBrowser1.Navigate("about:blank"); 25 str = sr.ReadToEnd();; 26 webBrowser1.Document.Write(str); 27 webBrowser1.Refresh(); 28 }