Execute of MVC Application in ASP .NET
Step 1: Client sends a request for the application to IIS
Step 2: IIS will redirect the request to the global.asax file Hear route table collection will be created by adding all the routes.
Step 3: Perform Routing --> hear URL routing module will check for the requested route in route table collections. If a route is not available in the route collection table error message will be sent to the client. If the requested route is available create a route object and then also create a request object.
Step 4: Create an MVC request handler:-
Hear MVC route handler class will take the route from route object and create an object for the MVC handler class bypassing the request context object. Hear request context object originally responsible to pass the request from ASP.net to MVC.
Step 5: Create a controller:-
Hear MVC handler class identifies the controller that is to be executed with the help of request context object by using the route object. It creates an object to the controller class.
Step 6: Execute controller:-
Hear execute method of the controller class will be called to start the execution of controllers.
Learn ASP.Net by Tekslate - Fastest growing sector in the industry. Explore Online "ASP.Net Training" and course is aligned with industry needs & developed by industry veterans.Tekslate will turn you into ASP.Net Expert.
Step 7: Invoke action:-
At this step MVC “run time will identify which action method should be called for execution and will invoke that method.”
Step 8: Execute result:-
Hear code in action method will be executed by using data from the model class Controller will be returned to view
Step 9: Execute view:-
In this step, the complete view code will execute by using the model class data if necessary.
The executed result sends to client Once the result is delivered to the client the execution result is completely destroyed at the server The types of result that an MVC application can handle take
- View result
- Redirect to route result
- Redirect result
- Content result
- JSON result
- File result
For in-depth understanding click on
- ASP. NET web applications and ASP. NET MVC Application.
- Object initialization
- Razor syntax
- Collection Initialize ASP.net
- View engine & Razor view engine