【发布时间】:2014-09-16 20:17:47
【问题描述】:
我正在尝试重定向到同一控制器中的另一个操作 动作称为索引
[HttpGet]
public ActionResult Search(string city)
{
return RedirectToAction("Index", "Rentals", new { CityName = city });
}
这是索引操作
[HttpPost]
public ActionResult Index(String CityName)
{
}
我错过了什么吗?
【问题讨论】:
-
如果将属性从 HttpPost 更改为 HttpGet 会发生什么?
-
如果你正在寻找像here这样的黑客攻击
标签: c# asp.net-mvc redirecttoaction