打开http://192.168.1.1/home.shtml后,
在其activate-key输入框中要输入一串激活码,如:8888888888
并且,点击Submit按钮提交激活,用HttpWebRequest/HttpWebResponse可以实现吗,如何实现?该段html如下:<div class="form1" id="test_activate" style="display: block;">
<form action="/test/activate-key" enctype="multipart/form-data" method="post">
<p><small><b>Activate</b>: 
<input name="activate-key" type="text">
<input value="Submit" type="submit">
</p></form></div>

解决方案 »

  1.   

    呼唤gzdiablo,,,,,,,,,,,,,,,,,,,,,,,,,,,,
      

  2.   

    http://www.wangchao.net.cn/bbsdetail_544477.html
      

  3.   

    [code=C#]You can do something like this
    string strNewValue;
    string strResponse;
    // Create the request obj
    HttpWebRequest req = (HttpWebRequest) WebRequest.Create("http://someur.com/page.aspx");
    // Set values for the request back
    req.Method = "POST";
    req.ContentType = "application/x-www-form-urlencoded";
    strNewValue = strFormValues + "&param1=value1&parm2=value2";
    req.ContentLength = strNewValue.Length;
    // Write the request
    StreamWriter stOut = new StreamWriter (req.GetRequestStream(), System.Text.Encoding.ASCII);
    stOut.Write(strNewValue);
    stOut.Close();
    // Do the request to get the response
    StreamReader stIn = new StreamReader(req.GetResponse().GetResponseStream());
    strResponse = stIn.ReadToEnd();
    stIn.Close();code]
    WebRequest - passing parameters using POST
      

  4.   

    get post都可以实现 参考
      

  5.   

    想请教一下vip__888和only_endure:如我这种情况,该如何提交,即怎样做到模拟输入8888888888(激活码)并点击“Submit”按钮?
      

  6.   

    webbrower
    模拟submit按钮
      

  7.   

    可以稍微详细些吗?从来没有做过web编程,一窍不通啊,用spy++也没办法获得Submit按钮的句柄,
    不知道该如何提交,最好是用HttpWebRequest/HttpWebResponse,或者WebClient也行,
    大家不要惜字如金,多说些吧,帮帮我,