在一个专网中采用浏览器页面来查询数据,在登录成功后,输入学号就会显示相应的成绩等信息,现在我需要查询的数据太多了,有几百个甚至几千个,不想一次输入一个得到一个结果,想做一个简单的程序,在后台sql中存储所有的学号,在前台表单winform中点击查询按钮就可以自动把所有学号对应的成绩都自动查出记录在sql中,该怎么办?

解决方案 »

  1.   

    webbrower
    httpwebrequest通过post传值获取返回数据
    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
    string s = "";
    byte[] requestBytes = System.Text.Encoding.ASCII.GetBytes ("");
    req.Method = "POST";
    req.ContentType = "application/x-www-form-urlencoded";
    req.ContentLength = requestBytes.Length;
    Stream requestStream = req.GetRequestStream();
      

  2.   

    webbrower
    httpwebrequest通过post传值获取返回数据
    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
    string s = "";
    byte[] requestBytes = System.Text.Encoding.ASCII.GetBytes ("");
    req.Method = "POST";
    req.ContentType = "application/x-www-form-urlencoded";
    req.ContentLength = requestBytes.Length;
    Stream requestStream = req.GetRequestStream();
    2楼写的是 下载页面
    你也对下载的 页面 进行处理
    截取相应的数据
    进行插入数据库操作即可