• How a view is found

    There are some confusing names here. ViewResult is kind of ActionResult. It is return by an object of Controller class. ViewResult uses VewEngineCollection, a collection of IViewEngine, to find a ViewEngineResult. ViewEngineResult may or may not contain an IView. IView is implemented by ViewPage, ViewUserControl.

    After a action result is returned from the action method, if it is ViewResult. The render method will find an ViewEngineResult through ViewEngineCollection object. The following code show how ViewEngineCollection finds ViewEngineResult, ViewEngineCollection enumerate all the ViewEngine to fine ViewEngineResult.

  • Context data in asp.net mvc

    Along the asp.net mvc stack, there are lots context data being passing around. The first context data is passed into MvcRouteHandler by the System.Web.Routing.UrlRoutingModule.

  • acton parameters

    The asp.net mvc framework matches action parameters in the following order:

    1. Form values
    2. Route arguments
    3. Querystring parameters
  • The options to render a partial view

    Normally you can do this,

    <% Html.RenderPartial("LogOnUserControl"); %>
    
  • asp.net mvc request walkthrough

    ASP.NET MVC request begin with a UrlRoutingModule. This component is not actually part of the System.Web.Mvc.dll, but of System.Web.Routing. You have to wire up in web.config like the following.