All MVC view pages follow the same life cycle regardless of the view engine:
- Routing - The request is mapped to an action method (using request data like URL, querystring, session, etc)
- Controller - A controller is created for the matching action method. It's populated with all the environment, request, and session data
- Action - The matching action method is called
- Result - The
ActionResult
returned by the action method is executed. For a view result, this means: 1) The view engine locates a matching view name, 2) the matching view is instantiated with any model data returned by the action method, 3) the view is processed by the view engine.
That means a WebForms view will be executed by the MVC WebForms view engine, not by the ASP.NET WebForms system. The view engine will perform some basic parsing to add the data from your model to your view (as specified with <%%>
).
Also, FYI you can even mix view engines in a single project (requires some setup).