- MVC Framework Tutorial
- MVC Framework - Home
- MVC Framework - Introduction
- MVC Framework - Architecture
- MVC Framework - ASP.NET Forms
- MVC Framework - First Application
- MVC Framework - Folders
- MVC Framework - Models
- MVC Framework - Controllers
- MVC Framework - Views
- MVC Framework - Layouts
- MVC Framework - Routing Engine
- MVC Framework - Action Filters
- Advanced Example
- MVC Framework - Ajax Support
- MVC Framework - Bundling
- Exception Handling
- MVC Framework Useful Resources
- Questions & Answers
- MVC Framework - Quick Guide
- MVC Framework - Resources
- MVC Framework - Discussion
MVC Framework Online Quiz
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.
Q 1 - How could you traditionally consume an ASMX web service from your application? (Choose all that apply.)
A - Generate a proxy by selecting Add Reference in Visual Studio.
B - Create an HttpService and connect using Get (URL).
C - Generate a proxy by selecting Add a Service Reference in Visual Studio.
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 - You are designing a work order management application for a mid-size repair company. The application will be used by repair personnel in the field on their laptops with wireless phone connections. The connections are slow, and the laptops are several years out of date. There will never be more than 15 users at any one time, and rarely more than 2 concurrent users. What kind of caching will give the repair personnel a better user experience? (Choose all that apply.)
Answer : E
Explanation
E.Page output caching will cache content at the client side to eliminate some of the required downloads. It is useful in a limited bandwidth environment. It can also be used in donut hole and donut caching scenarios for partial client-side caching.HTTP caching will help response time even though there is not much a developer needs to do to implement the caching.
Q 3 - Layout.cshtml and Site.Master are the two default template pages in ASP.NET MVC. Which of the following scenarios would best be solved using a single layout or master template? (Choose all that apply.)
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.
Q 4 - You have been asked by the marketing department to help improve your company's ranking in search engine results. They are particularly concerned about a section of the site that is highly interactive, with extensive mouse-over color, background, and text changes. Without looking at the code, what is the most likely reason for ranking low in search engine results?
B - Content hidden in JavaScript tags
Answer : B
Explanation
B.Additional views must be created or ported to fit the smaller layout.
Q 5 - You are creating an ASP.NET MVC website and you want to replace a <h2>hello</h2>tag within the view with custom resources you have created. What should you use?
A - <h2>@mvcapp.Resources.Home.Index.Heading</h2>
B - <h2div="resource">Hello</h2>
C - <h2 class="resource">Hello</h2>
Answer : A
Explanation
A.This is the correct way to insert resources into a view
Q 6 - You work for a financial services company that deals with many small brokers. Your executives want to be able to run a report that details all the actions taken by the brokers on the site as a form of auditing and protection. Neither the application nor system currently stores this kind of information. Which of the following are viable solutions? (Choose all that apply.)
D - Override the AuthorizeAttribute and have it store the user, the URL, and the forms collection.
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 7 - You are under contract with a large company that is starting to implement a TDD approach. As part of the long-term support for this effort, the company needs you to complete several unit tests. As you review the current code base, you find good tests for the model, but no tests for anything other than the model. Which of the following is the best approach to complete the unit tests?
Answer : D
Explanation
D.This solution provides for testing actions and nonactions as well as a good split of the tests per file.
Q 8 - What class handles the actual data encryption?
Answer : C
Explanation
C.CryptoStream provides access to an encrypted stream
Q 9 - What roles does a CA play in a PKI? (Choose all that apply.)
A - Serves the certificate for the web server
B - Validates the company or individual purchasing the certificate
C - Signs the certificate as authentic
D - Provides the Domain Name System (DNS) connections between the client and server
Answer : E
Explanation
E.The CA validates the company or individual.The CA signs the certificate
Q 10 - Which Action Result Renders a partial view, which defines a section of a view that can be rendered inside another view?
Answer : C
Explanation
C.PartialViewResult