- 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 - You are developing an application. One requirement is that part of your data access layer needs to be available to a third party, that wants to get this information from a REST URL in XML. Your company does not have experience with web services, but you have several websites running ASP.NET MVC 4. How could you design and provide these new services? (Choose all that apply.)
D - Create an ASP.NET ASMX services file to get, serialize, and return the data.
Answer : E
Explanation
E.Using ASP.NET MVC is another way to create a controller that will return XML.
Q 2 - What is the first request sent to start HTTP polling?
Answer : B
Explanation
B.The first request to open a WebSocket connection is a standard HTTP GET. After the request is received, the browser sends a separate upgrade request
Q 3 - You are creating an ASP.NET MVC web application. Within the application, you have created a partial view for contact email and phone number. Which code segment should you use to display the partial view on the main page?
A - @Html.ActionLink("ContactPartial")
B - @Html.Partial("ContactPartial")
Answer : B
Explanation
B.@Html.Partial loads a partial view.
Q 4 - You have been asked by a company to evaluate its web application as a user. The company wants you to review the website from outside its network and identify areas that might be problematic. You have been asked to consider SEO and accessibility. Which tools would be helpful for your review? (Choose all that apply.)
Answer : B
Explanation
B.The Internet Explorer F12 tool enables you view HTML and CSS code, which can help you detect structural problems or errors that might affect acces- sibility or SEO.
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 - You are re-creating an application that was originally built with ASP 2.0. You need to break the monolithic application into a traditional three-tier application. One of the requirements is that database errors must be displayed in the UI. Which solution will present enough information to the user so they can notify the appropriate person of a problem, but not allow the user to gain information about the design of the database?
A - Add a first chance exception handler and log the information in the error.
Answer : B
Explanation
B.The business layer is the appropriate place to manage data layer excep- tions. By repackaging it and sending it up to the user layer, you can maintain separation of concerns and meet the requirement to display information to the user. This will also enable you to log the information as necessary to support de- bugging.
Q 7 - Forms authentication enables you to write code to validate user credentials. After it is complete, you can register the authentication cookies for use throughout the user's visit by using which of the following?
A - FormsAuthentication.SetAuthCookie
B - FormsAuthenticationCookie = new FormsAuthenicationCookie();
Answer : A
Explanation
A.FormsAuthentication.SetAuthCookie registers the authentication token in the cookie for use in future requests
Q 8 - WIF enables you to create a custom token. To be able to use the token, you must create a custom token handler by overriding which of the following?
Answer : B
Explanation
B.SecurityTokenHandler is the appropriate class to override for creating a custom token handler
Q 9 - If you have View with @Page directive to inherit from ViewPage<TModel> then your View is_________.(where TModel is type of Model)
Answer : B
Explanation
B.Strongly typed views are bound to the model
Q 10 - Which of the following represents razor syntax?
Answer : B
Explanation
B.Razar syntax starts with @
To Continue Learning Please Login
Login with Google