ASP.NET MVC lifecycle

February 23, 2012 at 4:47 PMMadestro

I was working on something and needed to refer to the ASP.NET MVC lifecycle so I went out there and found the following information which I have compiled for your benefit:

Overview of the Lifecycle Steps

There are five main steps that happen when you make a request from an ASP.NET MVC website:

1. The RouteTable is Created

This first step happens only once when an ASP.NET application first starts. The RouteTable maps URLs to handlers.

2. The UrlRoutingModule Intercepts the Request

This second step happens whenever you make a request. The UrlRoutingModule intercepts every request and creates and executes the right handler.

3. The MvcHandler Executes

The MvcHandler creates a controller, passes the controller a ControllerContext, and executes the controller.

4. The Controller Executes

The controller determines which controller method to execute, builds a list of parameters, and executes the method.

5. The RenderView Method is Called

Typically, a controller method calls RenderView() to render content back to the browser. The Controller.RenderView() method delegates its work to a particular ViewEngine


I also found a chart by Steve Sanderson you can print and keep around your desk:

Posted in: ASP.NET MVC


Comments (5) -

Custom Printed Box
United States Custom Printed Box says:

Saved as a favorite, I love your blog!|

Brett Rossi
United States Brett Rossi says:

Have any arguments about me adding this on twitter?

Juan Romero
United States Juan Romero says:

Hi there. Feel free to publish this wherever you want.

Emily Olding
United States Emily Olding says:

I was able to find good information from your articles.

mouse click the following article
United States mouse click the following article says:

Thanks, I have been looking for details about this topic for ages and yours is the best I have discovered so far.