首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

请问:a.aspx文件中的JS文件post方式提交数据到B.aspx,怎么接收数据

2012-05-12 
请教:a.aspx文件中的JS文件post方式提交数据到B.aspx,如何接收数据?JScript codevar postA {a: a.temp

请教:a.aspx文件中的JS文件post方式提交数据到B.aspx,如何接收数据?

JScript code
var postA = {  "a": a.tempA[1],  "b": b.tempA[2],  "c": c.tempA[3],  "d": d.tempA[4],  "e": e.tempA[5],  "x": escape(a.tempA[16]),  tax: newItemA[0] || '',  rec: a.tempA[22] || '',  markets: a.tempA[23].join(',')  };  $.post("Add.html", postA, function(dt){  alert("添加成功!" + dt);  window.location.reload();  });





在b.aspx.cs文件:

C# code
string MyText = Request.QueryString["a"];//在A.aspx中可以执行到这里,但是读出来是空的。//  string MyText = Request.QueryString["a"].ToString();在A.aspx中可以执行不到到这里,点击没有任何反应。Response.Write("<script>alert('" + MyText + "  ');location.href='Index.aspx';</script>");


在b.aspx中,如何接收到:

  $.post("Add.html", postA, function(dt) 过来来的数据?

[解决办法]
request.form["xxxxx"]

热点排行