ASP.NET MVC Interview Questions Part-2

 
1. How is the flow of MVC?
=> 1) User URL request from browser first comes to controller.
     2) Controller processes request and talk to the model.
     3) Model prepares data and send it back to controller.
     4) Controller talks to view and then create the response by binding model and view.
     5) Then controller renders(display) the data to the browser.



2. What are razor views?
  • The razor view is a engine which allows us to write server-side code on view and helps us to write both HTML and C# code together. 


3. How is the URL structure of MVC core?
  • The URL structure of MVC core is localhost:4200/{controller}/{action name}. The "localhost:4200" is considered as a controller name.


4. If the view name is different than action name how to invoke it?
  • If the view name is different than action name then we have to write view in double quotes("").




5. How do we define navigation using anchor tag?
  • The navigations can be defined using anchor tag as <a href="/Controller name/Action name"></a>.


Thank You!!!

For more understanding watch below video:

Comments

Popular posts from this blog

Day 3 : JavaScript

SQL Concepts-1

ASP .NET Session Management