25th
Dec
MVC MCQ

MVC MCQ

  • Admin
  • 25th Dec, 2020
  • 1018 Followers

MVC MCQ Quiz

1) Can we use view state in MVC?

  • A. Yes
  • B. No

2) Is ViewBag slower than ViewData in MVC?

  • A. Yes
  • B. No

3) 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

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

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

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

  • A. .aspx
  • B. vbhtml
  • C. .cshtml
  • D. All are Correct
Download Free : MVC MCQ PDF

6) ........... 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

7) 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

8) 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

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

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

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

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

11) 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

12) 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

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

  • A. cshtml
  • B. vbhtml

14) Viewstart comes under ...........

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

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

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

16) 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

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) Does MVC 6 introduced new JSON project based structure?

  • A. Yes
  • B. No

19) 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

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

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

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

  • A. JSONRESULT
  • B. JSONRETURN
  • C. JSONBACKRESULT
  • D. None of the Above

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

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

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

  • A. HTTP GET
  • B. HTTP DELETE
  • C. HTTP CONNECT
  • D. None of the Above

24) 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

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

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

26) 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

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

  • A. Yes
  • B. No

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

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

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

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

30) 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

3 comment(s) :

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Dec
Laravel MCQ
01st
Dec
React JS MCQ
01st
Jan
AngularJs MCQ
01st
Jul
Node js MCQ
01st
Jul
Angular 2 MCQ
01st
Jul
JSON MCQ