public class BaseController : Controller
    {
        //
        // GET: /Base/

protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (Request.Cookies["user"] ==null)
            {
                string ReturnUrl = "/Home/HomeIndex"; //特定页面
                filterContext.Result = new RedirectResult(ReturnUrl);
            }
        }

}

05-11 15:36