如何使用 jquery ajax 打开带有布局的新页面?我需要将 strName 返回到我的控制器中的视图。
我的jQuery ajax:
mvcJqGrid.demo.edit = function (id) {
var urlEdit = '@Url.Action("Edit")';
$.ajax({
type:"GET",
url:urlEdit,
data:{strName: $('#customerGrid').jqGrid('getCell',id,'Client00130012')}
});
}
编辑: *我的视图控制器: *
public ActionResult Edit(string strName)
{
var q = from c in db.CanaClie0012
join w in db.Clientes0013 on c.Client00130012 equals w.Client0013
where c.Client00130012 == strName
select new ClientModel
{
CanaClie0012 = new CanaClie0012()
{
Client00130012 = c.Client00130012,
F1Pais00200012 = c.F1Pais00200012,
F1Cana02530012 = c.F1Cana02530012,
Direcc0012 = c.Direcc0012
},
Clientes0013 = new Clientes0013()
{
Client0013 = w.Client0013,
Nombre0013 = w.Nombre0013,
F1Pais00200013 = w.F1Pais00200013
}
};
return View(q);
}