如何重定向到aspx页面在一个控制器动作 [英] how to redirect to aspx page in a controller action
本文介绍了如何重定向到aspx页面在一个控制器动作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能重定向到一个aspx页面在(asp.net-MVC3)控制器动作?
应该是什么动作(的ActionResult?)的返回类型和重定向方法应该被调用(RedirectToAction?)。
is it possible to redirect to an aspx page in an (asp.net-mvc3 )controller action? What should be the return type of the action (ActionResult?) and which redirect method should be called (RedirectToAction?).
BR
推荐答案
您可以重定向从MVC行动的任何位置,你必须使用 RedirectResult
为。 RedirectResult
是一种类型的的ActionResult
。
You can redirect to anywhere from MVC action and you have to use RedirectResult
for that. RedirectResult
is a type of ActionResult
.
有关前。
public RedirectResult RedirectToAspx()
{
return Redirect("/pages/index.aspx");
}
这篇关于如何重定向到aspx页面在一个控制器动作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文