如何在C#中写一个WEB的表单集合并以POST方式提交到ASP(非ASP.NET)
ASP端用request.form接受
再得到ASP的返回信息(STRING)
如果ASP返回的是一个流又怎么解决
帮帮忙啊。我刚学C#
写一个微型ASP木马客户端工具

解决方案 »

  1.   

    function onsumbit()
    {
    document.form1.action='????????????????.asp'
    dccument.form1.sumbit();}
    你到底是要提交窗口还是只取其个数据回来?
    取数据回来: 用XMLHTTP;
      

  2.   

    意思是C#写的是应用程序。
    是将值提交到ASP WEB程序上
    Request.form是返回表单集合嘛。郁闷了。DELPHI的还会写。C#刚学。搞不懂
      

  3.   

    我知道用这个类。
    但用来来。找不到资料
    能不能给我做一个DEMO
      

  4.   

    string url = "网址";
    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
    string s = "要提交的数据";
    byte[] requestBytes = System.Text.Encoding.ASCII.GetBytes (LoginInfo);
    req.Method = "POST";
    req.ContentType = "application/x-www-form-urlencoded";
    req.ContentLength = requestBytes.Length;
    Stream requestStream = req.GetRequestStream();
    requestStream.Write(requestBytes,0,requestBytes.Length);
    requestStream.Close();
    HttpWebResponse res = (HttpWebResponse)req.GetResponse();
    StreamReader sr = new StreamReader(res.GetResponseStream(), System.Text.Encoding.Default);
    string backstr = sr.ReadToEnd();
    Response.Write(line);
    sr.Close();
    res.Close();
      

  5.   

    string url = "网址";
    string s = "要提交的数据";写给例子啊,要传多个参数怎么弄啊string url = "http://www.abc.com/do.asp";
    string s = "?a=1&b=2&c=3";这样写对吗,请赐教,学习中