ASP.NET MVC/MVC ASP.Net Multiple Choice Questions Sample Test,Sample questions

Question:
 BundleConfig.cs file is under in which App folder ? 

1.App_Data

2.App_Start

3.Content

4.Filters


Question:
 BundleConfig.cs in MVC is used to register filters for different purposes.

1. BundleConfig.cs in MVC is used to register filters for different purposes.

2.BundleConfig.cs in MVC is used to register bundles used by the bundling and minification, serveral bundles are added by default like jQuery,

3.All

4. None


Question:
 Does MVC 6 allow only save change, hitting the save but then refreshing the browser to reflect changes?

1.Yes

2. No

3.Both A & B

4.none of these


Question:
 How can we set theme to MVC Charts?

1.new Chart(width: 600, height: 400, theme: ChartTheme.Vanilla3D)

2.new Chart(width: 600, height: 400, theme: ChartTheme = Vanilla3

3.new Chart(width: 600, height: 400, theme: Vanilla3

4.None


Question:
 How can we write Chart output to MVC View?

1.Write(bmp);

2. Write("bmp");

3. .Write("bmp");

4.All


Question:
 How to check Request coming from which controller using MVC ASP.Net?

1. var _controller = HttpContext.Current.Request.RequestContext.Values["Controller"].ToString();

2.var _controller = HttpContext.Current.Request.RequestContext.RouteData.Values["Controller"].ToString();

3.var _controller = RouteData.Values["Controller"].ToString();

4.None


Question:
 If Razor View Engine need to add JQuery function and contain @ special character then how we can write it in Razor View? 

1.Replace @ to @@@ (tripple)

2. Replace @ to @@ (double)

3.None

4.Both A & B


Question:
 Is ViewData faster than ViewBag in MVC?

1.Yes

2.No

3. Both A) & B)

4.None


Question:
 RedirectToAction() works like in ASP.Net MVC C# as

1.Server.Transfer()

2.Response.Redirect()

3. Both A and B

4.None


Question:
 RedirectToActionPermanent() Method for which Status code represents?

1.304

2.302

3.301

4.300


Question:
 RouteConfig.cs file is under in which App folder ?

1.App_Data

2. App_Start

3.Content

4.Filters


Question:
 Viewstart comes under which folder name ?

1.Views

2.Account

3.Shared

4.Home


Question:
 What is  RouteConfig.cs in ASP.Net MVC?

1.RouteConfig.cs is used to register MVC config statements, route config.

2.RouteConfig.css is used to register global MVC bundles

3.None

4.all the above


Question:
 What is ActionResult() ?

1. It is an abstract Class

2.It is a Concrete Class

3.Both A and B

4.None of these


Question:
 What is BundleConfig.cs in ASP.Net MVC ?

1.BundleConfig.cs in MVC is used tegister filters for diffeo rrent purposes.

2.BundleConfig.cs in MVC is used to register bundles used by the bundling and minification, serveral bundles are added by default like jQuery, jQueryUI, jQuery validation, Modernizr, default CSS refere

3.all

4.None


Question:
 What is default authentication in Internet Information Services (IIS)?

1.Standard User

2.Administrator

3.Anonymous

4.None


Question:
 What is DRY principle in ASP.Net ?

1.Don't repeat yourself.

2.Don't revise yourself.

3.both a and b

4.None


Question:
 What is the benefits of Html.RenderPartial using ASP.Net MVC Razor Engine?

1.@Html.RenderPartial Returns response, moreover requires to create action.

2. @Html.RenderPartial Returns nothing (void), it is faster than @Html.Partial, moreover requires not to create action.

3.None

4.Both A & B


Question:
 What is the extension of MVC view when using vb.net?

1.cshtml

2.vbhtml

3.none

4. Both A & B


Question:
 What is the name of default Viewstart Page in ASP.Net MVC ?

1._ViewStart.cshtml

2. _Layout.cshtml

3. _Login.cshtml

4.None


Question:
 Which is the best approach to assign a session in MVC?

1.System.Web.HttpContext.Current.Session["LoginID"] =7;

2.Current.Session["LoginID"] =7;

3.Session["LoginID"] =7;

4.None of these


Question:
 Which Namespace is used for ASPX View Engine ?

1.System.Web.Razor

2.System.Web.Mvc.WebFormViewEngine

3.Both A & B

4. None


Question:
Are both TempData/ViewData property of Controller base class in MVC?

1. Yes

2.No

3.Both A & B

4.None


Question:
Are both TempData/ViewData require typecasting in MVC?

1. Both (TempData/ViewData) requires type casting to avoid null exception.

2.No, these (TempData/ViewData) does not require type casting.

3.Both A) & B)

4.None


Question:
Are MVC and Web API merged into one in MVC 6?

1.Yes

2.no

3.Both A & B

4.None


Question:
AuthConfig.cs file is under in which App folder ? 

1.App_Data

2.App_Start

3.Content

4.Filters


Question:
Can vNext runs on both Mac and Linux today (Mono Version)?

1.Yes

2.No

3.Both A & B

4.None


Question:
Can we use view state in MVC ?

1.Yes.

2.no

3.Both A & B

4.none


Question:
Does MVC 6 introduced new JSON project based structure?

1.Yes

2. No

3.Both A & B

4.None


Question:
Does Razor Engine supports for TDD ?

1.Yes

2.No

3.b

4.None


Question:
Does TempData used to pass data from one page to another page in MVC?

1.Yes

2.No

3.Both A) & B)

4.None


Question:
Does Viewstart override all Views layout/template under "Views" folder in MVC ?

1.Yes

2. No

3.Both A & B

4.none of these


Question:
Does vNext is now Open Sourced via the .NET Foundation and open to public contributions.

1.Yes.

2.no

3.Both A & B

4.None


Question:
FilterConfig.cs file is under in which App folder ? 

1.App_Data

2. App_Start

3.Content

4.Filters


Question:
For which ModelState.IsValid Validate ?

1.It checks for Entityframework Model state.

2. It checks for valid Model State using DataAnnotations.

3. It checks for SQL database state.

4.none


Question:
How can we add Chart Type to MVC Charts?

1..NewSeries(chartType: "Bar")

2.Series(chartType: "Bar")

3. .AddSeries(chartType: "Bar")

4.all


Question:
How can we give Title to MVC Charts?

1. var chart = AddTitle("My First Chart")

2..AddTitle("My First Chart")

3. .AddTitle('My First Chart')

4.al


Question:
How can we provide Height and Width to MVC Charts ?

1.new Chart(width - 600, height - 400)

2. new Chart(width = 600, height = 400)

3.new Chart(width: 600, height: 400)

4.All


Question:
How can you comment using Razor Syntax?

1.@ Comment me *@

2.@* Comment me *@

3.@* Comment me @*

4.*@ Comment me @*


Question:
How does work Viewstart in MVC (ASP.Net)?

1. Viestart is used to layout of the application.

2.Viewstart is used like Masterpage in traditional forms (ASP.Net pages).

3.Viewstart render first in the views

4. A, B and C.


Question:
How to Print value from Controller to View in MVC ?

1.ViewBag.ECMDetail = "my message"; and in view @ViewBag.ECMDetail

2. ViewBag.ECMDetail = "my message"; and in view ViewBag.ECMDetail

3.ViewBag.ECMDetail = "my message"; and in view ViewBag.Title

4.None


Question:
How to set Default Value to Hidden Input Box using ASP.Net MVC? 

1. @Html.HiddenFor(m => m.Name, "Jack")

2. @Html.HiddenFor(m => m.Name, new { Value = "Jack"})

3.@Html.Hidden(m => m.Name, new { Value = "Jack"})

4.none


Question:
In which format data can be return from XML into table ?

1.DataSet

2.Datatable

3.A and B

4.None


Question:
Is ViewBag slower than ViewData in MVC?

1.Yes

2.no

3.Both A & B

4.None


Question:
RedirectToAction() Method for which Status code represents?

1.304

2.302

3.301

4.300


Question:
RedirectToAction() works like in ASP.Net MVC C# as

1.Server.Transfer()

2. Response.Redirect()

3.Both A and

4.None


Question:
return View() works like in ASP.Net MVC C# as

1.Server.Transfer()

2.Response.Redirect()

3.Both A and B

4. None


Question:
The ASPX View Engine uses to render server side content.

1.@

2.<%= %>

3.Both A & B

4.no


Question:
The Razor View Engine uses to render server side content.

1.@

2. <%= %>

3.Both A & B

4.None


Question:
What is AuthConfig.cs in ASP.Net MVC ?

1.uthConfig.cs is used to configure route settings

2.AuthConfig.cs is used to configure security settings including sites oAuth Login.

3.None

4.All


Question:
What is FilterConfig.cs in ASP.Net MVC ?

1. FilterConfig.cs is used to register global MVC filters, HandleErrorAttribute is registered by default filter. We can also register other filters.

2.FilterConfig.cs is used to register global MVC bundles.

3.None

4.All


Question:
What is the benefits of Html.Partial using ASP.Net MVC Razor Engine?

1.@Html.RenderPartial Returns response, moreover requires to create action.

2. @Html.RenderPartial Returns string value, it is slower than @Html.RenderPartial, moreover requires not to create action

3.None

4. Both A and B


Question:
What is the difference between HtmlTextbox and HtmlTextboxFor using ASP.Net MVC Razor Engine?

1.@Html.TextBox is not strongly typed, @Html.TextBoxFor is strongly typed that is why should be use @Html.TextBoxFor in MVC Razor Engine.

2.@Html.TextBox is strongly typed, @Html.TextBoxFor is not strongly typed that is why should be use @Html.TextBox in MVC Razor Engine.

3.None

4.Both A and B


Question:
What is the extension of MVC view when using C#?

1.cshtml

2.vbhtml

3.None

4.Both A & B


Question:
What is ViewResult() ?

1. It is an abstract Class

2. It is a Concrete Class

3. Both A and B

4.none of these


Question:
What Request Processing technique follows ASP.Net ?

1. Top-Down

2.Down-Up

3.Pipeline

4.Water fall


Question:
Which  Namespace is used to "Display" in Data Annotation using MVC ?

1.System.ComponentModel

2.System.ComponentModel.DataAnnotations

3.Both A and B

4.None


Question:
Which  Namespaces are required to Data Annotation using MVC ?

1.System.ComponentModel

2.System.ComponentModel.DataAnnotations

3. Both A and B

4.None


Question:
Which filter will be execute at first using ASP.Net MVC?

1. Action filters

2.Authorization filters

3.Response filters

4.Exception filters


Question:
Which filter will be execute at last using ASP.Net MVC?

1.Action filters

2.Authorization filters

3.Exception filters

4.Response filters


Question:
Which is more faster between ASPX View Engine and Razor View Engine.

1. ASPX View Engine

2.Razor View Engine

3. Both A & B

4.None


Question:
Which is the way to render Partial View using ASP.Net MVC Razor Engine?

1.@Html.Partial("_PartialHeader")

2.@Html.PartialView("_PartialHeader")

3.@Html.PartialHtml("_PartialHeader")

4. B and C


Question:
Which name space using can send email in ASP.Net MVC?

1.using System.Net.Mail;

2.using System.Net;

3. using System.Mail

4.none


Question:
Which Namespace is used for Razor View Engine ?

1.System.Web.Razor

2.System.Web.Mvc.WebFormViewEngine

3. Both A & B

4. None


More MCQS

  1. MVC ASP.Net Multiple Choice Questions
  2. ASP.Net MVC Multiple choice
  3. ASP.Net MCQs Set 1
  4. ASP.Net MCQs Set 2
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!