<form action="http://aaaaaa.hiaaa/aaa.php" method=post>
<INPUT type=radio value=4 name=piao checked>
<INPUT type=submit value=提交 name=Submit>
</FORM>用JS实现了自动表单的提交现在想用C# 模拟把表单的内容提交到http://aaaaaa.hiaaa/aaa.php这个页面,不知道该怎么办
再往上找到的都是类似于http://aaaaaa.hiaaa/aaa.php?value=4这种类型的
现在想把radio里面的内容提交,高手帮忙
<INPUT type=radio value=4 name=piao checked>
<INPUT type=submit value=提交 name=Submit>
</FORM>用JS实现了自动表单的提交现在想用C# 模拟把表单的内容提交到http://aaaaaa.hiaaa/aaa.php这个页面,不知道该怎么办
再往上找到的都是类似于http://aaaaaa.hiaaa/aaa.php?value=4这种类型的
现在想把radio里面的内容提交,高手帮忙
解决方案 »
- 新手问题,请帮忙看一下
- 用Graphic类绘图的疑问。
- 怎样检测usb设备的插拔?
- 主窗体被Hide()以后,在第2个窗体文件中如何在 调用主窗体的show()?
- 100分求Jmail的ASP.net的C#实例,回贴请到http://community.csdn.net/Expert/topic/4238/4238094.xml?temp=.6963007
- 如何把listBox1控件中的内容都存储在一个文件中?
- 请教各位高手:下面的错误是怎么回事,该如何解决————急急急!!!
- 求助,新人妹子用listview控件添加图片编辑。。
- SharpSSH 显示出来多余的代码问题
- 如何取得系统的当前日期及时间
- 请专家解答:SaveFileDialog1.DialogShow(),为何对话框出不来?
- 一个两个窗体间数据传递的问题
//Post方法使用类,用于在ASP.NET中进行Post传值
//
/*使用方法:
声明: RemotePost myremotepost = new RemotePost();
传值目标: myremotepost.Url = "Post传值接受页面.aspx";
加入一个参数: myremotepost.Add("a","11");
加入另一个一个参数: myremotepost.Add("b","100");
传出: myremotepost.Post(); */using System;
using System.Web;
namespace ThinkBank.Libs.Command
{ public class PostLib
{
private System.Collections.Specialized.NameValueCollection Inputs = new System.Collections.Specialized.NameValueCollection();
public string Url = "";
public string Method = "post";
public string FormName = "form1";
public void Add(string name,string value)
{
Inputs.Add(name,value);
}
public void Post()
{
System.Web.HttpContext.Current.Response.Clear(); System.Web.HttpContext.Current.Response.Write("<html><head>");
System.Web.HttpContext.Current.Response.Write(string.Format("</head><body onload=\"document.{0}.submit()\">",FormName));
System.Web.HttpContext.Current.Response.Write(string.Format("<form name=\"{0}\" method=\"{1}\" action=\"{2}\" >",FormName,Method,Url));
for(int i=0;i< Inputs.Keys.Count;i++)
{
System.Web.HttpContext.Current.Response.Write(string.Format("<input name=\"{0}\" type=\"hidden\" value=\"{1}\">",Inputs.Keys[i],Inputs[Inputs.Keys[i]]));
}
System.Web.HttpContext.Current.Response.Write("</form>");
System.Web.HttpContext.Current.Response.Write("</body></html>"); System.Web.HttpContext.Current.Response.End();
}
}
}