jquery中的ajax操作给后台传值 $.ajax({ type: 'POST', url: '<%=Url.Action("test","testIndex")%>', data: { paraOne: $("#txt1").val(), paraTwo: $("#txt2").val(), paraThree: $("#txt3").val() }, success: function (mess) { // 成功以后需要做的事情 } }) control中接收传递过来的值方式如下:
string paraOne= Request["paraOne"].ToString(); string paraTwo= Request.Form["paraTwo"].ToString(); string paraThree = Request.Params["paraThree"].ToString();
以上方法经过验证好用,希望对有需要朋友提供帮助和参考。东北大亨。