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

MVC3异步调用有关问题

2012-10-10 
MVC3异步调用问题onExpandRow: function (index, row) {$(#ddv- + index).datagrid({url: @Url.Action(

MVC3异步调用问题
onExpandRow: function (index, row) {
  $('#ddv-' + index).datagrid({
  url: '@Url.Action("Pos", "Resume")'


[HttpPost]
  public JsonResult Pos()
  {
  int total = 0;
int resumeID=10057;
  List<PositionResume> posresumes = new List<PositionResume>();
  posresumes = posresumeService.GetPositionResumsList(resumeID, ref total);


  Dictionary<string, object> json = new Dictionary<string, object>();
  json.Add("total", total);
  json.Add("rows", posresumes);

  return Json(json, JsonRequestBehavior.AllowGet);
  }


以上异步调用能运行到JsonResult Pos(),可为以下什么异步调用却运行不到JsonResult Pos(int resumeID)呢?

onExpandRow: function (index, row) {
  $('#ddv-' + index).datagrid({
  url: '@Url.Action("Pos", "Resume")/' + row.resumeID,


[HttpPost]
  public JsonResult Pos(int resumeID)
  {
  int total = 0;
  List<PositionResume> posresumes = new List<PositionResume>();
  posresumes = posresumeService.GetPositionResumsList(resumeID, ref total);


  Dictionary<string, object> json = new Dictionary<string, object>();
  json.Add("total", total);
  json.Add("rows", posresumes);

  return Json(json, JsonRequestBehavior.AllowGet);
  }


[解决办法]
onExpandRow: function (index, row) {
$('#ddv-' + index).datagrid({
url: '@Url.Action("Pos", "Resume")?resumeID=' + row.resumeID,

热点排行