【发布时间】:2019-02-20 17:48:52
【问题描述】:
我正在尝试重定向到不同的视图 (ApartmentController) , 所以我已经尝试了这里提到的所有方法:RedirectToAnOtherView 但没有一个和我一起工作, 任何帮助将不胜感激 我的控制器是 ApartmentController 我的视图是索引,所以我的网址就像“公寓/索引” 我试过了:
return RedirectToAction("/Apartment/Index",new Apartment());
return View("Apartment");
return RedirectToActionPermanent("Apartment");
没有人与我合作
【问题讨论】:
-
你在做ajax吗?客户端代码是什么样的?
-
是的,它是 ajax 请求
-
“没有人与我合作”。那么实际发生了什么?
-
@ColinM 它不会重定向到公寓/索引
标签: c# .net asp.net-mvc asp.net-core-mvc