ASP.NET MVC Interview Questions and Answers for experienced and fresher

1. What is ASP.NET MVC?

MVC is the architectural pattern to develop applications. Here

M- Model - will be having business logic
V-View - This is the front end of the application
C- Controller - Communicates between view and model.


Watch this video for more information.






2. Why We need to use ASP.NET MVC over legacy ASP.NET?

In legacy ASP.NET we are going through complete ASP.NET life cycle. But in ASP.NET MVC just we are hitting directly controller without any extra operations.

Watch this video for more information. 

3. What is Controller in MVC? Explain with an example?

This is one of the layer in MVC and handles users interaction between model and view. 

Please watch controller example program with video tutorial. 

4. What is Model in MVC? Explain with an example?

This is one of the layer of the application and work on processing the data for the application. 

Please watch Model example program with video tutorial. 

5. What is View in MVC? Explain with an example?

This is one of the layer of the application and this will display data to the user. 

Please watch Model example program with video tutorial. 


6. Briefly explain ASP.NET MVC life cycle?


7. What are main advantages of MVC?

a. Separation of concerns. 
b. Multiple view support. 
c. We can do unit testing in all phases. 
d. very fast compare to legacy ASP.NET application model. 
e. We can use all features of ASP.NET. 

Please watch this video for more information. 

8. What are different folders in ASP.NET?

a. Models
b. Controllers
c. Views
d. App_start

Please watch this video for more information. 

9. What is routing concept in MVC? explain with an example?

Route is noting but URL pattern i.e. mapped to the handler. Default route is defined in the App_Start -> Routeconfig.cs file. We can customize URL route as per our requirement. 

Example: 
using System.Web.Mvc;
using System.Web.Routing;

namespace WebApplication1
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}


10. What are the features of ASP.NET MVC 1.0?

HTML helpers
UNIT testing support
Ajax helpers
Routing concept

11. What are the features of ASP.NET MVC 2.0?

Data annotation attributes
Strongly types HTML helpers for better views
scaffoldering and different usage templates
override HTML Verbs(GET, PUT, DELETE AND POST)
Async Contorllers
Templated helpers
Improved server and client side validations
AREAS

12. What are the features of ASP.NET MVC 3.0?

Templates for HTML5 and CSS 3
Improved Model validation
Razor View Engine
Controller Improvements
Unobtrusive Java script approach
Partial page output caching
Support for Multiple view engines
Improved dependence injection
Improved Data annotations
Session less controller
Support code first approach through entity framework
ViewBag class
Actions filters with global functionality
provided more intellisense feature for view operations.


13. What are the features of ASP.NET MVC 4.0?

Adaptive rendering
Empty project template
support for adding controller
Bundling and Minification
Support for windows Azure SDK 1.6
ASP.NET Web API
Look-n-feel improvements
Mobile project Templates
Task Support for Asyn Controller
Support for OAuth and OpenID
Display modes


14. What are the features of ASP.NET MVC 5.0?

ASP.NET Identity
Filter Overrides
One ASP.NET
ASP.NET Web API 2.0
Attribute Routing
Authentication Filters
Boot Strap

15. What are the features of ASP.NET MVC 6.0?

Merged - MVC, Web API and Web pages into one framework
new json extension for project(project.json) for listing all dependencies replacing global.asax with start up class.
Host agnostic
Built in dependency injection feature
.Net vNext - Cross platform support with open source support
Optimized cloud versions of Web API, SignalR, EF, MVC and Web pages.
Removed dependence on System.Web for reducing HttpContext object size.
Ready to deploy in cloud environment. Enhanced Cache and sessions support
side by side deployment
Roslyn compiler - no need to rebuild.
New project system
New configuration system.

Explain HTML Helpers in ASP.NET MVC?
Explain AJAX Helpers in ASP.NET MVC?
Explain Auto binding in ASP.NET MVC?
What is Razor and difference between Razor and ASP.NET Engine?
What is Area in ASP.NET MVC?
Explain what is mobile project template?
Explain Bundling and minification with an example?
What is Asynchronous controller in ASP.NET MVC? Expalin with an example?
How to do validations in ASP.NET MVC? Explain DataAnnotations?
How to implement client side validations in ASP.NET MVC?
How to implement validation summary in ASP.NET MVC?
What is custom template in ASP.NET MVC? Explain with an example?
What is Scaffolding in ASP.NET MVC? Explain with an example?
Explain different action return types from controller in ASP.NET MVC?
How to pass data from view to controller? Explain with an example?
How to pass data from Controller to Controller? Explain with an example?
How to pass data from controller to view? Explain with an example?
What is ViewBag in ASP.NET MVC? Explain with an example?
What is ViewData in ASP.NET MVC?  Explain with an example?
What is TempData in ASP.NET MVC?  Explain with an example?
What is the difference between Action result and view result?
Expalin Action result with an ASP.NET MVC example?
Expalin ViewResult with an ASP.NET MVC example?
Expalin PartialviewResult with an ASP.NET MVC example?
Expalin ContentResult with an ASP.NET MVC example?
Expalin RedirectResult result with an ASP.NET MVC example?
Expalin EmptyResult with an ASP.NET MVC example?
Expalin FileResult with an ASP.NET MVC example?
Expalin JSONResult with an ASP.NET MVC example?
Expalin JavascriptResult with an ASP.NET MVC example?
Expalin RedirectResult with an ASP.NET MVC example?
Expalin RedirectToAction result with an ASP.NET MVC example?
Expalin RedirectToRoute result with an ASP.NET MVC example?
Explain filters concept in MVC?
What are action filters in ASP.NET MVC? Explain with an example?
What are Exception filters in ASP.NET MVC? Expalin with an example?
What are Authorization filters in ASP.NET MVC? Explain with an example?
What are Result filters in ASP.NET MVC? Expalin with an example?
How to implement Output Cache with ASP.NET MVC Action filters?
Can we handle errors using action filters? Explain with an example?
Can we authorize usin ASP.NET MVC filters? Explain with an example?
What is Partial view in ASP.NET MVC? How to implement this partial view in program?
Can we load two partial views using one controller action method?
What is the difference between normal view and partial view in ASP.NET MVC?
How to do Unobtrusive javascript validations in ASP.NET MVC?
How to implement global filters in ASP.NET MVC?
How to implement Remote validation in ASP.NET MVC?
What is dependence injection? How to implement dependence injection in ASP.NET MVC?
Explain Authentication filters in ASP.NET MVC?
How to implement Bootstrap in ASP.NET MVC? Explain with an example?
What is ASP.NET Identitiy? How to implement using ASP.NET MVC with an example?
Example program for attribute based routing in ASP.NET MVC?
Explain HTML Form elements in ASP.NET MVC?
How to implement forms authentication in ASP.NET MVC?
How to implement windows authentication in ASP.NET MVC?
How to implement display modes using ASP.NET MVC?
Explain different types of error handling mechanisms in ASP.NET MVC?
How to implement master pages in ASP.NET MVC?
What is layout concept in MVC? Explain with an example?
What are possible places for viewStart page in ASP.NET MVC?
How to implement custom error page in ASP.NET MVC?
How to implement action link in ASP.NET MVC?
How to implement BeginForm in ASP.NET MVC?
How to implement CheckBox in ASP.NET MVC?
How to implement DropDownList in ASP.NET MVC?
How to implement Hidden in ASP.NET MVC?
How to implement ListBox in ASP.NET MVC?
How to implement Password in ASP.NET MVC?
How to implement RadioButton in ASP.NET MVC?
How to implement TextArea in ASP.NET MVC?
How to implement TextBox in ASP.NET MVC?
How to implement RenderSection in ASP.NET MVC?







If you have any queries or suggestions, please feel free to ask in comments section.
Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

 
Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar