【发布时间】:2011-09-09 13:48:07
【问题描述】:
这两条路径有什么区别?
http://www.mydomain.com/testmvc3
http://www.mydomain.com/testmvc3/
我把代码放在 HomeController 里:
// GET: /Home/
public ActionResult Index()
{
if (Request.IsAuthenticated)
{
return RedirectToAction("Index", "Member");
}
else
{
return View();
}
}
但只有第二个链接可以正常工作,但第一个仍然显示主页。(即使它是经过身份验证的)如何使它们具有相同的反应?
【问题讨论】:
标签: asp.net-mvc-3 razor uri redirecttoaction