- 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 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 - .Which of the following are valid reasons for overriding the Run method? (Choose all that apply.)
C - Managing error handling for the application
D - Starting and supporting a logging application for use by the Worker role
Answer : E
Explanation
E.Creating and running an application in parallel is what the Run method was designed to allow.The polling service is a good example of an activity in which the Run.method enables a process to work independently of the main role.Creating and running an application in parallel is what the Run method was designed to allow.
Q 2 - You are creating an ASP.NET MVC 4 web application that will be accessed by a large number of traditional consumers. If you need to be able to access state information on the client side in JavaScript/jQuery, where can you store it? (Choose all that apply.)
Answer : E
Explanation
E.Query string information is available across all browsers and is usable on both the client and server.Cookies can be stored for a period of time on the client and be read from either client- or server-side operations.
Q 3 - Your team is building an application and you are reviewing the functional specifications. Your team must include a stockticker in the UI that displays the companys stock price every 15 minutes, and include the capability to do partial saves of base objects as users step through a data entry wizard. You want to use the same approach for both requirements to make it easier to add functionality and maintain it going forward. What approach should you use?
Answer : B
Explanation
B.The best way to solve this issue is to use AJAX to do asynchronous calls to check the stock price as well as manage the save process through the wizard.
Q 4 - What are common methods for detecting the type of browser running on a client? (Choose all that apply.)
A - Use JavaScript to query for the userAgent header.
B - Use the window.addEventListener method.
C - Use the viewport <meta> tag.
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 have written a shareware application and want to sell it on your personal website. You are considering various approaches for distributing the application after users purchase it. Which of the following is the best approach?
A - Use the FileResult action result to initiate the file download.
D - Create an email containing a link to a route from which the user can download the file.
Answer : A
Explanation
A.The FileResult property was designed for this need.
Q 6 - Your U.S.-based company recently opened an office in England. Staff members have been making lots of sales calls, which have generated an increase in visits to the company's websites. Much of the activity involves downloading sales sheets, product descriptions, and other sales support information currently stored in PDFs. There have been some performance-related complaints from remote sales staff, but no local users have noticed any problems. Which of the following are potential solutions? (Choose all that apply.)
A - Bundle and minify the PDF files to ensure that there is no wasted space.
D - Add two additional servers and create a server farm to serve your content.
Answer : E
Explanation
E.This solution causes more work on the client side to open and view the compressed content, but it provides a more responsive user experience.Moving the part of the site most affected by the new usage closer to the users increases their download speed and thus their perceived performance.
Q 7 - Your ASP.NET MVC web application has just been released to a group of pilot users. The users are reporting periods of extreme performance degradation. You did not encounter performance issues during development or the quality assurance phase. What can you do in your development environment to understand what is occurring in the production environment?
Answer : C
Explanation
C. Starting from a midlevel count of users and then increasing to the total number of possible numbers should give you an idea of what is happening during the day-to-day running of the application in production
Q 8 - Which methods help the RoleProvider determine whether a user is assigned a role or set of roles? (Choose all that apply.)
Answer : E
Explanation
E.GetRolesForUser gets a list of roles for a user.IsUserInRole returns a Boolean on whether a particular user has a role
Q 9 - Which of the following statement is false about MVC in .NET?
A - Complete control over your HTML Markup
B - Makes Test Driven Development (TDD) very difficult
C - Allows you to create SEO-friendly URLs for your site
Answer : B
Explanation
B.Makes Test Driven Development (TDD) very difficult
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