关于获取网页内容的问题!
gjwj 2003-10-20 12:18:46 我写了一个获取网页的程序:
address1="http://www.xxx.com/music/music_lib/singer.asp?name=李克勤";
address1=address1.Replace("李克勤",HttpUtility.UrlEncode("李克勤",System.Text.Encoding.Default));
address1=address1.Replace("singer.asp?",HttpUtility.UrlEncode("singer.asp?",System.Text.Encoding.Default));
zt.Text="系统获取网络数据中..............!";
wreq=WebRequest.Create(address1.ToString());
wresp=(HttpWebResponse)wreq.GetResponse();
s=wresp.GetResponseStream();
StreamReader objReader = new StreamReader(s,System.Text.Encoding.GetEncoding("GB2312"));
while (sLine!=null)
{
sLine = objReader.ReadLine();
if (sLine!=null)
HTML += sLine;
}
的时候能获取过来,但是当我把address1该为=="http://www.xxx.com/music/music_lib/singer.asp?pagenow=2&name=李克勤"
的时候却获取的跟刚才的内容一样,不过我怎么改变pagenow=?的值都和"singer.asp?name=李克勤"和"singer.asp?pagenow=1&name=李克勤"的时候一样.....这是为什么啊?(该页共有5页,不过怎么做都只能获取第一页)