MVC Framework Online Quiz


Advertisements

Following quiz provides Multiple Choice Questions (MCQs) related to MVC Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Answer : E

Explanation

E.HttpService.Get gets the output of a REST service.Visual Studio creates a proxy for you from the WSDL at the site you select.

Q 2 - What is the technique in which the client sends a request to the server, and the server holds the response until it either times out or has information to send to the client is?

A - HTTP polling

B - HTTP long polling

C - WebSockets

D - HTTP request-response

E - C and D both

F - All of the above

Answer : B

Explanation

B.In HTTP long polling, the client sends a request to the server, and the server holds it open until it either has something to return to the client or the con- nection times out.

Answer : E

Explanation

E.Adding logic to the master page to determine the menu design enables your application to display a menu section that changes based on the area of the application the user is visiting.Referencing all style pages in a single place, the layout page, is an appropriate use.

Answer : E

Explanation

E.Using JavaScript to query the userAgent gives you information about the type of browser being used by the client.The display mode provider performs some of the analysis of the HTTP request to try and determine what kind of browser made the request.

Q 5 - You are developing an ASP.NET MVC application. You have a set of requirements to create a help section for remote users. Your typical help scheme is help/desktop or help/mobile, so logically this section should be help/remote. The change board wants the links in the application to point to the default support site. Which code segment would you use?

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

B - routes.MapRoute( "remote", "help/remote",new { controller = "support", action = "Index" });

C - routes.MapRoute( "remote", "help",new { controller = "support", action = "Index" });

D - routes.MapRoute( "remote", "remote/help",new { controller = "support", action = "Index" });

E - C and C both

F - All of the above

Answer : B

Explanation

B.This is how you add an additional route and point to a different controller.

Answer : E

Explanation

E.Creating a globally applied action filter enables you to save the state of every action taken by the user while logged in to your site.By creating a globally applied action filter you have ensured that every action taken by the user will be logged.

Q 8 - Windows Azure ACS allows for federated identification from outside agencies such as a Microsoft account or Facebook. Which entity issues the final token that your application will accept for access?

A - The outside agency

B - Your application

C - Your network firewall

D - Windows Azure ACS

E - A and B both

F - All of the above

Answer : D

Explanation

D.ACS reads the token provided by the identity providers and creates a token that your application understands and accepts.

Q 9 - You are implementing an ASP.NET MVC 2 Web application. The URL with path /Home/Details/{country} will return a page that provides information about the named country. You need to ensure that requests for this URL that contains an unrecognized country value will not be processed by the Details action of HomeController.What should you do?

A - Add the ValidateAntiForgeryToken attribute to the Details action method.

B - Add the Bind attribute to the country parameter of the Details action method. Set the attribute's Prefix property to Country.

C - Create a class that implements the IRouteConstraint interface. Configure the default route to use this class.

D - Create a class that implements the IRouteHandler interface. Configure the default route to use this class.

E - A and D both

F - All of the above

Answer : C

Explanation

C.IrouteConstraint interface is implemented to configure default route to implement custom logic

Q 10 - Which Helper Method is used to return a user-defined content type.

A - Content

B - JavaScript

C - View

D - RedirectToRoute

E - A and D both

F - All of the above

Answer : A

Explanation

A.Content Helper Method is used to return a user-defined content type.

mvc_framework_questions_answers.htm

Useful Video Courses


Video

ASP.NET Core 3 MVC Application with MongoDB

44 Lectures 4.5 hours

Kaushik Roy Chowdhury

Video

ASP.NET MVC 5 for Beginnners

Most Popular

42 Lectures 18 hours

SHIVPRASAD KOIRALA

Video

Building Web Applications with ASP.NET Core 3 MVC

57 Lectures 3.5 hours

University Code

Video

Application Web complète avec ASP .NET CORE 3.1 MVC

55 Lectures 4.5 hours

University Code

Video

Real-world App with ASP.NET CORE 3.1 MVC & MongoDB (NoSQL)

40 Lectures 2.5 hours

University Code

Video

Advanced ASP.NET Core 3.1 MVC

140 Lectures 9 hours

Bhrugen Patel

Advertisements