打开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>
在其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>
解决方案 »
- 关于VSTO开发Outlook插件的部署
- Winform:单据上的值改变,保存按钮可用,不保存关闭提示,如何设置?
- 蚂蚁在热锅上!!关于网络聊天的问题,大家进来看看
- 动态checkbox怎么给他定位啊要不都挤到一起了
- 问个属性的问题
- C#如何响应C++触发的事件?急....................
- 关于资源文件的使用,找遍Google、MSDN都没有答案,寄望于各位了
- 不同用户的数据缓存解决方法(100分)
- 关于RSA加密的问题
- 怎么让TextBox的BackColor支持透明色?
- 模拟浏览器在编辑框中输入内容并点击提交按钮!
- 试过无数方法 至今纠结 问天下英雄 违反并发性: UpdateCommand 影响了预期 1 条记录中的 0 条。
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 + "¶m1=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
模拟submit按钮
不知道该如何提交,最好是用HttpWebRequest/HttpWebResponse,或者WebClient也行,
大家不要惜字如金,多说些吧,帮帮我,