Table of Content :

  1. Can you explain the complete flow of MVC?
  2. Explain Page Life Cycle of ASP.NET MVC?

How Request is handled in ASP.NET MVC?

Tips for Women in the days of menstruation

Page Lifecycle of an ASP.NET MVC:

  1. App initialization- Browser request pages to IIS

  2. Perform routing - IIS will pass this request to Application UrlRoutingMoule will try to find Route defined in RouteTable

  3. Create MVC request handler- UrlRoutingMoule will try to find matching Route defined in RouteTable collection. If matching route found - MvcRouteHandler will create instance of MvcHandler

  4. Controller-

    1. Create controller- MvcHandler will create an instance of controller

    2. Execute controller - MvcHandler calls the controllers Execute method

    3. Invoke action - controller determines which action method of the controller class to call, and then calls that method.

  5. Controller to Model - Controller work with Model- to retrieve and store data, to perform business logic for application.

  6. Model to Controller- Model provides data to controller

  7. Controller to View - Controller execute the result by returning a result type.

  8. View to Controller - View can also directly interact with controller (e.g. while interacting with  multiple modules ).

  9. Return Result to IIS - Appropriate return type based on action will be returned to IIS.

  10. Return to Browser - Render result to Browser