Books MVC ASP.NET C# SQL Server WCF Written Test HR Round Subscribe C# Videos C# Programs Buy DVD

Saturday, November 19, 2011

Basic MVC Interview Questions

What are the 3 main components of an ASP.NET MVC application?
1. M - Model
2. V - View
3. C - Controller

In which assembly is the MVC framework defined?

Is it possible to combine ASP.NET webforms and ASP.MVC and develop a single web application?
Yes, it is possible to combine ASP.NET webforms and ASP.MVC and develop a single web application.

What does Model, View and Controller represent in an MVC application?
Model: Model represents the application data domain. In short the applications business logic is contained with in the model.

View: Views represent the user interface, with which the end users interact. In short the all the user interface logic is contained with in the UI.

Controller: Controller is the component that responds to user actions. Based on the user actions, the respective controller, work with the model, and selects a view to render that displays the user interface. The user input logic is contained with in the controller.

What is the greatest advantage of using mvc over webforms?
It is difficult to unit test UI with webforms, where views in mvc can be very easily unit tested.

Which approach provides better support for test driven development - ASP.NET MVC or ASP.NET Webforms?

What are the advantages of ASP.NET MVC?
1. Extensive support for TDD. With MVC, views can also be very easily unit tested.
2. Complex applications can be easily managed
3. Seperation of concerns. Different aspects of the application can be divided into Model, View and Controller.
4. ASP.NET MVC views are light weight, as they donot use viewstate.

Is it possible to unit test an MVC application without running the controllers in an ASP.NET process?
Yes, all the features in an MVC application are interface based and hence mocking is much easier. So, we don't have to run the controllers in an ASP.NET process for unit testing.

Is it possible to share a view across multiple controllers?
Yes, put the view into the shared folder. This will automatically make the view available across multiple controllers.

What is the role of a controller in an MVC application?
The controller responds to user interactions, with the application, by selecting the action method to execute and alse selecting the view to render.

Where are the routing rules defined in an MVC application?
In Application_Start event in Global.asax

Name a few different return types of a controller action method?
The following are just a few return types of a controller action method. In general an action method can return an instance of a any class that derives from ActionResult class.
1. ViewResult
2. JavaScriptResult
3. RedirectResult
4. ContentResult
5. JsonResult

What is the significance of NonActionAttribute?
In general, all public methods of a controller class are treated as action methods. If you want prevent this default behaviour, just decorate the public method with NonActionAttribute.


  1. Great work Venkat
    Please work on a whole section on Domain Driven Development ...including DTOs, Automapping, facades, agents etc
    Developer 2012

  2. How to explain our project architecture/Flow many interviewer ask in interview can you explain with example
    Thanks in advance

  3. Replies
    1. Hello Prashanth,

      Videos for MVC have been uploaded by venkat sir.


    2. Hello Prashanth,

      Videos for MVC have been uploaded by venkat sir.


    And this comment is not PREVENTING XSS(Cross Site Scripting)

  5. Nice work Venkat Sir..very thankful to u.. :)

  6. Great Work and Effort really helpful.

  7. Thank you for such wonderful explanation of video tutorials
    Thanks a lot

  8. can we create windows form application using MVC?

  9. can you provide the demo of mvc applicaion with source code for practical purpose. I have needs of sources code for practise. Plz help me............

  10. Please upload some videos for Crystal Reports

  11. vanket sir your all videos are much more understandable and i want to say a big thanks for all those videos which helped me .
    Sir I request please make videos for interview of mvc

  12. Hi.. Great work indeed, Venkat Sir. Sir today, i was interviewed for the position of MVC Developer. It was so easy to answer all the questions, after watching your video tutorials. Sir, the only question, which made me think to some time was, how to perform memory management, as mvc doesn't support ViewState. I in it's reply, said that there is no need to manage the memory in mvc, as mvc itself takes care of memory management, whereas there is a need to manage the memory in webforms, so therefore webforms supports ViewState. I don't know if i am wrong or right, Venkat Sir, you kindly put some light on it.

  13. we can also seprate the consorn in .in ASP we hava all ready work on three what is the need of mvc framework


Disclaimer - Terms of use - Contact Us