I used to develop with ColdFusion for a while, but then left the web development arena for a while. I'm back, now, and have been hired as an intermediate (right above entry)-level web developer. My workplace is using MVC 4, but is not using the Razor view engine. The two MVC 4 books that I've purchased (as well as the huge number of tutorials and blogs out there) only discuss using Razor- which I AM using in my self-study, but I need to understand how it works when NOT using the Razor engine.
When using the ASPX view engine, how do you go about using it? Does it work like a normal ASPX page, where I place my ASP.NET controls on the page and then reference them with the code-behind in C#? Only, rather than using ASP.NET controls, I'm using HtmlHelper methods instead? Keep in mind, I'm not asking about the basic format of using <% %> instead of <@, because most of that was covered here: http://haacked.com/archive/2011/01/06/razor-syntax-quick-reference.aspx. I fail to understand how traffic will get routed to those ASPX pages through my basic HomeController (which just has a few ActionResult() methods, nothing large).
I can elaborate more, if need be.
All MVC view pages follow the same life cycle regardless of the view engine:
ActionResultreturned 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).