In this article I am sharing questions related to ASP.NET MVC. I have made list of most frequently asked questions. These questions are generally helpful for candidate having overall 2-5 years of experience(except TDD) out of which at least one project or six months in ASP.NET MVC. The candidate who are aspirant for lead role should focus more on security, authentication and authorization, filters, DI, design of best grids, scenario based(challenge faced or achieving particular functionality or he/she will give you scenario what actually he/she is facing or faced) along with below questions.
Sometimes candidates does step by step(just copying and pasting) assignment from other blogs and try to showcase experience(fake) on ASP.NET MVC. I would suggest those candidate to understand the concept first and then try to implement small CRUD based application by designing own approach.
The candidates who worked mostly on ASP.NET WebForms and seeking opportunity on ASP.NET MVC should understand the difference between the both architectural style.
The questions related to ASP.NET MVC are as below,
- What is MVC?
- What is difference between ASP.NET MVC and ASP.NET WebForm?
- How will you choose ASP.NET WebForm or ASP.NET MVC?
- What is Data Annotation?
- What are type of validations?
- What is Unobtrusive Validation?
- What is Model.IsValid() ?
- What are HTML Helpers in MVC?
- What is Razor?
- What is Model Binders?
- What is FormCollection?
- What is difference between FormCollection and Model Binders?
- What is Routing in MVC?
- What is the significance of NonActionAttribute?
- What is Site.Master?
- Can we create multiple Master pages in MVC?
- What are Areas in MVC?
- Is it possible to share a view across multiple controllers? How ?
- What are the Action Filters in MVC.NET?
- What are type of Action Filters? What are Types?
- What is base class for Action Filters?
- What is Authorization Filter ? How will you apply for all actions ? How will you apply for particular action?
- What is Exception Filter ? How will you make it generic ?
- What is Custom Filters?
- What are Features of MVC 3?
- What are the Features of MVC 4?
- What are the Features of MVC 5?
- Which MVC Version you used ? Why?
- What is HTTPModule and HttpHandlers?
- Explain in detail MVC Page life cycle?
- Explain in detail Routing in MVC ?
- What are partial views in MVC?
- What are different type of action results in MVC?
- What is JsonResult?
- Whai is ActionResult?
- What is PertialViewResult?
- What is TempData, ViewData and Viewbag?
- What are ways to POST or Submit data to MVC Controller?
- How will you update particular smaller section/panel without refreshing page?
- What is AntiForgeryToken?
- Did you taken any special steps to proctect your asp.net mvc application from cross site scripting (XSS) attacks ?
- What is Bundling and Minification?
- What are DTO’s?
- What is View Model?
- How did you mapped your properties?
- What is AutoMapper? Why it is used ?
Test Driven Development(TDD)
- Did you implemented any test cases? if yes What kind Of ?
- What is Mocking?
- Which Mocking Framework used ?
- What is Assert Class ? Why it is there?
- How did you tested business logic(Service Layer)?
- How you tested views ?
- What is TextFixture?
Dependency Injection(DI) and Inversion Of Control(IOC) Container
- What is Dependency Injection?
- What is Service Locator?
- What is Autofac?
- What is Unity Framework?
- List Examples of Dependency Injection ?
- What is jQuery?
- What is latest version available ?
- What are jQuery Selectors?
- What is siblings in jQuery?
- What is JSON?
**Scenario Based Question for candidate having less than 5 years of experience (most important)
Some interviewer may ask this question to validate you really worked on MVC concepts. On this question interviewer try to judge your coding skills. His/Her requirement would be as below.
Statement: I wanted to develop one application which could help me to save employee specific information. I want the application should provide me below functionalities,
- It should display all employee records on page in tabular format
- Table should have links to Edit and Delete records
- I want to create new employee record
- I want to update existing employee record
- I want to soft delete existing employee record
- I want employee’s email address should be unique in database
I hope these questions helps you prepare your ASP.NET MVC Interviews. I wish all the best for your interviews.