The following outlines
how the request moves through ASP.NET, to the controller, and through the view:
1 Request comes in to /Home.
2 IIS determines the request should be handled by ASP.NET.
3 ASP.NET gives all HttpModules a chance to modify the request.
4 The UrlRoutingModule determines that the URL matches a route configured in
the application.
Listing 1.2 Unique addition to the web.config file
Figure 1.4 The starter project comes with a basic
layout and CSS.
Licensed to Gayle M. Noll
10 CHAPTER 1 Getting started with the ASP.NET MVC Framework
5 The UrlRoutingModule gets the appropriate IHttpHandler from the IRoute-
Handler that is used in the matching route (most often, MvcRouteHandler) as
the handler for the request.
6 The MvcRouteHandler constructs and returns MvcHandler.
7 The MvcHandler, which implements IHttpHandler, executes ProcessRequest.
8 The MvcHandler uses IControllerFactory to obtain an instance of IController
using the "controller" to route data from the route {controller}/
{action}/{id}.
9 The HomeController is found, and its Execute method is invoked.
10 The HomeController invokes the Index action.
11 The Index action adds objects to the ViewData dictionary.
12 The HomeController invokes the ActionResult returned from the action,
which renders a view.
13 The Index view in the Views folder displays the objects in ViewData.
14 The view, derived from System.Web.Mvc.ViewPage, executes its Process-
Request method.
15 ASP.NET renders the response to the browser.
how the request moves through ASP.NET, to the controller, and through the view:
1 Request comes in to /Home.
2 IIS determines the request should be handled by ASP.NET.
3 ASP.NET gives all HttpModules a chance to modify the request.
4 The UrlRoutingModule determines that the URL matches a route configured in
the application.
Listing 1.2 Unique addition to the web.config file
Figure 1.4 The starter project comes with a basic
layout and CSS.
Licensed to Gayle M. Noll
10 CHAPTER 1 Getting started with the ASP.NET MVC Framework
5 The UrlRoutingModule gets the appropriate IHttpHandler from the IRoute-
Handler that is used in the matching route (most often, MvcRouteHandler) as
the handler for the request.
6 The MvcRouteHandler constructs and returns MvcHandler.
7 The MvcHandler, which implements IHttpHandler, executes ProcessRequest.
8 The MvcHandler uses IControllerFactory to obtain an instance of IController
using the "controller" to route data from the route {controller}/
{action}/{id}.
9 The HomeController is found, and its Execute method is invoked.
10 The HomeController invokes the Index action.
11 The Index action adds objects to the ViewData dictionary.
12 The HomeController invokes the ActionResult returned from the action,
which renders a view.
13 The Index view in the Views folder displays the objects in ViewData.
14 The view, derived from System.Web.Mvc.ViewPage, executes its Process-
Request method.
15 ASP.NET renders the response to the browser.
No comments:
Post a Comment