newsgroups-index (beta)

Current group: microsoft.public.cn.dotnet.languages.vb

=?Utf-8?B?6K+36ZeuaHR0cHdlYnJlcXVlc3TmgI7kuYjot5/ouKrot7PovazlkI7nmoTnvZE=?=

=?Utf-8?B?6K+36ZeuaHR0cHdlYnJlcXVlc3TmgI7kuYjot5/ouKrot7PovazlkI7nmoTnvZE=?=  
=?Utf-8?B?5pel6JC95LqR5oKg5oms?=
From:=?Utf-8?B?5pel6JC95LqR5oKg5oms?=
Subject:=?Utf-8?B?6K+36ZeuaHR0cHdlYnJlcXVlc3TmgI7kuYjot5/ouKrot7PovazlkI7nmoTnvZE=?=
Date:Sun, 23 Jan 2005 20:27:03 -0800
我用httpwebrequest类连接了一个internet资源,在post用户名,密码以后网页发生3秒后跳转,我想获取

登陆跳转后的网页源代码,请问该怎么做。。。查过msdn,好像没有类似的描述。。。谢谢

部分源代码如下


Dim url1 As New Uri("http://www.????.com")
Dim req As HttpWebRequest
req = CType(WebRequest.Create(Url1), HttpWebRequest)
req.Method = "POST"
req.ContentType = "application/x-www-form-urlencoded"
Dim bytesData() As Byte = System.Text.Encoding.ASCII.GetBytes _
("username=XXXXXX&password=******")
req.ContentLength = bytesData.Length
'读取返回的httpWebResponse流
'post数据3秒后,url自动重定向到主页,我想取得登陆以后的主页源代码,
'以下代码仅能获得3秒注册停留时的页面源代码,并不是注册成功后的主页源代码
Dim res As HttpWebResponse = CType(req.GetResponse(), HttpWebResponse)
Dim reader As StreamReader = _
New StreamReader(res.GetResponseStream, _
System.Text.Encoding.GetEncoding("GB2312"))
Dim respHTML As String = reader.ReadToEnd()
   

Copyright © 2006 newsgroups-index   -   All rights reserved   -   Impressum