1、直接Redirect后加 Controller/Action
Response.Redirect("/User/Edit");
// return Redirect("/User/Edit");
return RedirectToAction("about","Home");
Response.Redirect("/User/Edit");
2、直接return后加 Controller/Action
return Redirect("/User/Edit");
3、RedirectToAction方法,直接跳到一个action
return RedirectToAction("edit");
4、跳转的页并不在该Controller中
return RedirectToAction("about","Home");
@Url.Action("index", "product", new { id = item.Value.ID })
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步