RT 小弟想用C#做一个教务数据的客户端,可以让用户免于天天上网查询
网址是:
http://byjw.bupt.edu.cn:8080/
但是在这之前需要登录一下,让用户输入用户名和密码,然后提交表单,获得返回的网页
应该怎么做?用到什么机制呢?希望得到指点。 另:和这个网站是怎么做的有关系吗,我用浏览器登录了以后发现网址是xxxxx.do这样的...

解决方案 »

  1.   

    google HttpRequesthttp://blog.sina.com.cn/s/blog_6221a3490100ieav.html
      

  2.   

    楼主查查winform中webbroswer控件的用法。很好实现你的要求。
      

  3.   

    把网页上的内容抓取出来绑到报表上显示给用户http://www.legalsoft.com.cn/docs/854.html
      

  4.   

    需要这个控件吗?
    比如我做的只是个控制台程序呢?我用   // Specify the destination URL.
                string strUrl = @"http://roll.news.sina.com.cn/news/shxw/qwys/index.shtml";
                // Specify the regular expression.
                string strReg;
                //string strRegRow = "";
                string strHtml;            WebRequest request = WebRequest.Create(strUrl);
                Console.WriteLine("Sending request...");
                using (WebResponse response = request.GetResponse())
                {
                    Console.WriteLine("Receiving response...");
                    using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.Default))
                    {
                        // Get the HTML source.
                        Console.WriteLine("Reading HTML source...");
                        strHtml = reader.ReadToEnd();
                       // Console.WriteLine(strHtml);
                        Console.WriteLine("Completed reading HTML.\n\n");
                    }
                }/**/这样的代码爬过数据 不知道是不是一个道理?