我正在尝试重定向到来自另一个操作结果函数的后操作结果。在这种情况下,我想从Summary函数重定向到Index Post。那可能吗?我可以重定向到[AcceptVerbs(HttpVerbs.Post)] ActionResult吗?
索引页面是我的搜索页面,Post操作将返回结果。如果用户在地址栏中输入一个ID,则可以执行搜索并显示结果。
public ActionResult Summary(string id)
{
//simple code
if(true)
{
return RedirectToAction("Index", "Home", HttpVerbs.Post);
}
return View();
}
你能提供你为什么要这样做的信息吗? – Moulde 2011-06-13 14:03:48
我觉得这个答案会提供一些有用的上下文http://stackoverflow.com/questions/46582/response-redirect-with-post-instead-of-get/47735#47735 – 2011-06-13 14:04:39
索引页是我的搜索页面和帖子行动将返回结果。如果用户在地址栏中输入一个ID,则可以执行搜索并显示结果 – MrM 2011-06-13 14:06:04