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"];