예제 #1
0
        protected ActionResult BlogIndexResult()
        {
            BlogController blogController = new BlogController();
            System.Web.Routing.RouteData routeData = this.RouteData;
            routeData.Values["action"] = "Index";
            routeData.Values["controller"] = "Blog";
            routeData.DataTokens["area"] = "";

            blogController.ControllerContext = new ControllerContext(HttpContext, routeData, blogController);
            blogController.TempData = this.TempData;
            return blogController.Index(null, null);
        }
예제 #2
0
        protected ActionResult BlogIndexResult()
        {
            BlogController blogController = new BlogController();

            System.Web.Routing.RouteData routeData = this.RouteData;
            routeData.Values["action"]     = "Index";
            routeData.Values["controller"] = "Blog";
            routeData.DataTokens["area"]   = "";

            blogController.ControllerContext = new ControllerContext(HttpContext, routeData, blogController);
            blogController.TempData          = this.TempData;
            return(blogController.Index(null, null));
        }