Wednesday, 25 September 2013

MVC Execution Flow

MVC Execution Flow:

Browser à Global.asax à URL Routing à Controller à Controller Invokes action à Returns Action Result à Returns to View Rendered HTML content à Response back to browser.

     1.       When user enters URL in Browser. Consider URL:  ABC.com/home/index
     
     2.       In Global.asax, the specific entered URL will be parsed through application_start() method of it.                     From the requested URL, it will parse Controller, Action and Parameters.

           ABC.com/home/index:
           Controller = home
           Action=index
           Parameters= empty – No parameters passed here in above URL
  
    3.       Now finds the home controller in controllers directory which contains several action methods, in that it           will invoke the index action method 

   4.       It will render HTML and returns to View.


No comments:

Post a Comment