当前位置: 代码迷 >> ASP.NET >> mvc3中location.href传值如何接收不到
  详细解决方案

mvc3中location.href传值如何接收不到

热度:7918   发布时间:2013-02-25 00:00:00.0
mvc3中location.href传值怎么接收不到啊
前台 

 $('.btnEdit').bind('click', function () {
  var number="1002";
  location.href = "/aa/Edit/"+number;

  });

mvc3的controller中

  public ActionResult Edit(string number)
  {
   
  Directory directory = resourceService.GetDirByNum(number);
  return View();
  }

怎么接收不到 number 值呢 number 为null

------解决方案--------------------------------------------------------

location.href = "/aa/?number="+number;


string data=Request["number"];
  相关解决方案