• Admin
  • 25th Dec, 2020


Following are mostly asked Mvc MCQ test that are designed for professionals like you to crack you interviews. You can take this Mvc online test before appearing to you real interview. This Mvc quiz there are around 30+ multiple choice questions on Mvc with four options.

1) Which is the best approach to assign a session in MVC?

  • A. Session["LoginID"] =7;
  • B. Current.Session["LoginID"] =7;
  • C. System.Web.HttpContext.Current.Session["LoginID"] =7;
  • D. None

2) FilterConfig.cs file is under in which App folder?

  • A. Content
  • B. Filters
  • C. App_Data
  • D. App_Start

3) Which is more faster between ASPX View Engine and Razor View Engine.

  • A. Razor View Engine
  • B. ASPX View Engine
  • C. Both A & B
  • D. None of the Above

4) ........... helps you to maintain data when you move from controller to view.

  • A. View Data
  • B. View Bag
  • C. Temp Data
  • D. None of above

5) What is the extension of MVC view when using vb.net?

  • A. cshtml
  • B. vbhtml
Download Free : MVC MCQ PDF

6) What are the various types of filters in an ASP.NET MVC application?

  • A. Result filters
  • B. Action filters
  • C. Authorization filters
  • D. All of these

7) Which filter will be execute at last using ASP.Net MVC?

  • A. Action filters
  • B. Exception filters
  • C. Authorization filters
  • D. Response filters

8) RedirectToAction() Method for which Status code represents?

  • A. 301
  • B. 302
  • C. 304
  • D. None of the Above

9) Which of the following view file types are supported in MVC?

  • A. .aspx
  • B. vbhtml
  • C. .cshtml
  • D. All are Correct

10) In the model-view-controller (MVC) architecture, the model defines the

  • A. Interface layer
  • B. Presentation layer
  • C. Data-access layer
  • D. Business-logic layer

11) Can we use view state in MVC?

  • A. Yes
  • B. No

12) List out few different return types of a controller action method?

  • A. View Result
  • B. Redirect Result
  • C. Javascript Result
  • D. All of these

13) Which Name space is used to create chart using ASP.Net MVC?

  • A. using System.Web.Chart
  • B. using System.Web.MVC
  • C. using System.Web.Helpers
  • D. None of the Above

14) Which of the following method of html helper generates html control based on the data type of specified property?

  • A. Html.Editor
  • B. Html.Display
  • C. Html.Password
  • D. Html.TextBox

15) For controller action method . . . . . returns nothing as the result.

  • A. EmptyResult
  • B. ResultEmpty
  • C. ReturnEmpty
  • D. EmptyReturn

16) What is the first request sent to start HTTP polling?

  • D. None of the Above

17) What are common methods for detecting the type of browser running on a client?

  • A. Use the DisplayMode provider
  • B. Use JavaScript to query for the userAgent header
  • C. Use the viewport <meta> tag.
  • D. Both A & B

18) Which Helper Method is used to return a user-defined content type.

  • A. Content
  • B. View
  • C. JavaScript
  • D. None of the Above

19) Which Namespaces are required to Data Annotation using MVC

  • A. System.ComponentModel
  • B. System.ComponentModel.DataAnnotations
  • C. Both A & B
  • D. None of the Above

20) Does TempData used to pass data from one page to another page in MVC?

  • A. Yes
  • B. No

21) Viewstart comes under ...........

  • A. View Bag
  • B. Temp Data
  • C. View Data
  • D. None of the Above

22) Which of the following What Request Processing technique follows ASP.Net?

  • A. Pipeline
  • B. Down-Up
  • C. Top-Down
  • D. None of the Above

23) You can use . . . . . class to send the result back in JSON format in MVC

  • D. None of the Above

24) How to set Default Value to Hidden Input Box using ASP.Net MVC?

  • A. @Html.HiddenFor(m => m.Name, "Jack")
  • B. @Html.Hidden(m => m.Name, new { Value = "Jack"})
  • C. @Html.HiddenFor(m => m.Name, new { Value = "Jack"})
  • D. None of the Above

25) How to Print value from Controller to View in MVC ?

  • A. ViewBag.ECMDetail = "my message"; and in view ViewBag.Title
  • B. ViewBag.ECMDetail = "my message"; and in view ViewBag.ECMDetail
  • C. ViewBag.ECMDetail = "my message"; and in view @ViewBag.ECMDetail
  • D. None of the Above

26) Does MVC 6 introduced new JSON project based structure?

  • A. Yes
  • B. No

27) What is the name of default Viewstart Page in ASP.Net MVC?

  • A. _Login.cshtml
  • B. _Layout.cshtml
  • C. _ViewStart.cshtml
  • D. None of the Above

28) Which filter will be execute at first using ASP.Net MVC?

  • A. Action filters
  • B. Response filters
  • C. Exception filters
  • D. Authorization filters

29) How can we write Chart output to MVC View?

  • A. Write("bmp");
  • B. .Write("bmp");
  • C. Write("bmp");
  • D. None of the Above

30) Is ViewBag slower than ViewData in MVC?

  • A. Yes
  • B. No

Mvc Online Test Questions (Mvc FAQs)

1) What is a controller in mvc?

Controller in MVC are responsible for controlling the flow of the application execution. They are responsible for processing requests and returning the response.

2) What is ViewBag in mvc?

ViewBag in MVC is used to transfer temporary data (which is not included in the model) from the controller to the view.

3) MVC is composed of what three components?

MVC is composed of Model, View and Controller.

4) What is Razor in MVC?

Razor is View Engine in Asp.net MVC that allows embed server-based code into web pages using C# and VB.Net.

5) What are the Filters in MVC?

Filters in MVC are custom class where you can write custom logic to execute before or after an action method executes.

6) What are Route Constraints in MVC?

Route Constraint in ASP.NET allows us to apply a regular expression to a URL segment to restrict whether the route will match the request.

7) What is TempData in MVC?

TempData in MVC is a dictionary object that is used to store data temporarily. It keep data for the duration of a HTP request, in other words it can keep live data between two consecutive HTTP requests.

8) What is Spring MVC?

Spring MVC is Model-View-Controller (MVC) architecture based web framework and have multiple builtin components that can be used to develop flexible and loosely coupled web applications.

9) What is WebAPI?

Web API in ASP.NET is an extensible framework for building HTTP based services that can be accessed in different applications on different platforms.

10) What are HTML Helpers in ASP.Net MVC?

HTML Helpers in ASP.Net MVC are classes that are used to render HTML controls in the razor view.

3 comment(s) :

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

Html MCQ
JavaScript MCQ
Matlab MCQ