日期:2014-05-17  浏览次数:20372 次

请教: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"]