System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url)
request.UserAgent = "Mozilla/4.0 (compatibleMSIE 8.0Windows NT 5.1Trident/4.0.NET CLR 2.0.50727.NET CLR 3.0.04506.648.NET CLR 3.5.21022)"
System.Net.WebResponse response = request.GetResponse()
System.IO.Stream resStream = response.GetResponseStream()
System.IO.StreamReader sr = new System.IO.StreamReader(resStream, encoding)
string html = (sr.ReadToEnd())
resStream.Close()
sr.Close()
_blank,在新窗口显示目标网页_self,在当前窗口显示目标网页
_parent,框架网页中当前整个窗口位置显示目标网页
_top,框架网页中在上部窗口中显示目标网页
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)