- 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 - What occurs if an unhandled error is fired on a startup task?
B - The startup is cancelled and the role does not start.
C - The OnStop method automatically runs.
D - The startup task goes to the lowest security setting and continues to run, if possible.
Answer : B
Explanation
B.The task will stop processing and return a non-zero value.
Q 2 - In an HTTP module, can you redirect the request to a different handler than is in the routing table? If so, what event would you handle?
A - Yes and you handle the PostAuthorizeRequest event.
C - Yes and you handle the MapRequestHandler event.
Answer : C
Explanation
C.You handle the mapping of the request in the MapRequestHandler.
Q 3 - You are designing a web application. You want to create a certain look and feel while reusing styles across pages as much as possible. How should you handle styles?
A - Use only one or two styles throughout your application to simplify maintenance.
B - Use a specific (unique) style for every element.
C - Use general styles for common elements and specific styles for elements that are unique.
Answer : C
Explanation
C.You should use general styles as much as possible. Achieving a certain look and feel means that you might have to create some specific styles, however.
Q 4 - You are modifying an existing ASP.NET MVC web application to incorporate mobile access. What should you do to ensure that mobile devices view mobile-only pages? (Choose all that apply.)
A - Run the Install-Package jQuery.Mobile.MVC command using the Package Manager console.
B - Create a _Layout.Mobile.cshtml master layout page.
C - Create additional views with .Mobile, such as Index.Mobile.cshtml.
Answer : E
Explanation
E.This installs all the necessary mobile packages.All mobile views and mobile master layout ensure that the page will load accordingly.
Q 5 - You are developing an ASP.NET MVC application. You noticed a bug on the DVD controller of the application. You want to ignore the DVD pages until the bug is fixed. What should you do?
A - Add route.SetItem(route.Count, "dvd/"); to the RegisterRoute method.
B - Add route.IgnoreRoute("dvd/"); to the RegisterRoute method.
C - Add route.Insert(route.Count,"dvd/"); to the RegisterRoute method.
Answer : B
Explanation
B.IgnoreRoute is the correct statement to use.
Q 6 - You are helping a client estimate the effort involved in adding comprehensive monitoring to an enterprise-level ASP.NET MVC application. Which of the following are useful considerations while building the estimate? (Choose all that apply.)
Answer : E
Explanation
E.Adding health monitors is an easy task. Determining which options pro- vide the information you need will be time-consuming because of the number of choices.Generic logging is a useful addition and can be added as items are refac- tored; it is not an all-or-nothing type of work.
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 - 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?
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.
Answer : C
Explanation
C.IrouteConstraint interface is implemented to configure default route to implement custom logic
Q 10 - what is strongly typed view in mvc
A - view created with model class
B - view having same name as class
C - view created with strong keyword
Answer : A
Explanation
A.Strongly typed views are created with model class
To Continue Learning Please Login
Login with Google