ASP.NET MVC (Model-View-Controller) Interview Questions

 
1.
What is MVC?
2.
What are the 3 main components of an ASP.NET MVC application?
3.
In which assembly is the MVC framework defined?
4.
Is it possible to combine ASP.NET webforms and ASP.MVC and develop a single web application?
5.
What does Model, View and Controller represent in an MVC application?
6.
What is the greatest advantage of using asp.net mvc over asp.net webforms?
7.
Which approach provides better support for test driven development - ASP.NET MVC or ASP.NET Webforms?
8.
What are the advantages of ASP.NET MVC?
9.
Is it possible to unit test an MVC application without running the controllers in an ASP.NET process?
10.
Is it possible to share a view across multiple controllers?
11.
What is the role of a controller in an MVC application?
12.
Where are the routing rules defined in an asp.net MVC application?
13.
Name a few different return types of a controller action method?
14.
What is the significance of NonActionAttribute?
15.
What is the significance of ASP.NET routing?
16.
What are the 3 segments of the default route, that is present in an ASP.NET MVC application?
17.
Example:
18.
ASP.NET MVC application, makes use of settings at 2 places for routing to work correctly. What are these 2 places?
19.
What is the adavantage of using ASP.NET routing?
20.
What are the 3 things that are needed to specify a route?
21.
Is the following route definition a valid route definition?
22.
What is the use of the following default route?
23.
What is the difference between adding routes, to a webforms application and to an mvc application?
24.
How do you handle variable number of segments in a route definition?
25.
What are the 2 ways of adding constraints to a route?
26.
Give 2 examples for scenarios when routing is not applied?
27.
What is the use of action filters in an MVC application?
28.
If I have multiple filters impleted, what is the order in which these filters get executed?
29.
What are the different types of filters, in an asp.net mvc application?
30.
Give an example for Authorization filters in an asp.net mvc application?
31.
Which filter executes first in an asp.net mvc application?
32.
What are the levels at which filters can be applied in an asp.net mvc application?
33.
Is it possible to create a custom filter?
34.
What filters are executed in the end?
35.
Is it possible to cancel filter execution?
36.
What type of filter does OutputCacheAttribute class represents?
37.
What are the 2 popular asp.net mvc view engines?
38.
What symbol would you use to denote, the start of a code block in razor views?
39.
What symbol would you use to denote, the start of a code block in aspx views?
40.
In razor syntax, what is the escape sequence character for @ symbol?
41.
When using razor views, do you have to take any special steps to proctect your asp.net mvc application from cross site scripting (XSS) attacks?
42.
When using aspx view engine, to have a consistent look and feel, across all pages of the application, we can make use of asp.net master pages. What is asp.net master pages equivalent, when using razor views?
43.
What are sections?
44.
What are the file extensions for razor views?
45.
How do you specify comments using razor syntax?