Adblocker Detected
Quizack provides Online Quiz and Practice MCQs for Free. Please disable your Ad-Blocker so we can earn from ads and keep this project alive.
1. How to preserve session in TempData for consecutive requests
2. The ASP.NET run-time detects the browser user-agent using
3. An anti-forgery token is useful for
4. ASP.NET MVC Framework implements a(n):
5. True or False? You can use routing and "web.config" files to secure your MVC application.
6. You are developing an ASP.NET MVC application. The application must allow users to enter JavaScript in a feedback text box only. You need to disable request validation. What should you do?
7. What is the most scalable way to share Session information in a web farm?
8. Which class contains information about the HTTP request that is parsed and inspected by the MVC pipeline when determining which controller and action to invoke?
9. What does "Remote" attribute do?
10. RenderPartial method:
11. You are authoring unit tests. The unit tests must test code that consumes sealed classes. You need to create, maintain, and inject dependencies in the unit tests.
12. Which class is used by the MVC pipeline to map data from a HTTP request to the parameters in a controller's action method?
13. Which method is NOT valid in the context of an MVC view?
14. Which property can you set on the BundleCollection class to indicate that you wish to enable support for CDN scripts or styles?
15. The advantage of using read-only attribute for session state is:
16. What is the advantage of InProc Session Storage over the other built-in methods?
17. What type of filter should be used if you want to modify the result of an action method?
18. You are developing an ASP.NET MVC 2 application. A view contains a form that allows users to submit their first name. You need to display the value that is submitted, and you must ensure that your code avoids crosssite scripting. Which code segment should you use?
19. An MVC Filter can only be applied as an Attribute above an Action or Controller
20. Which attribute could you use if you had a property on your Model class that you wish to be hidden when using the EditorForModel HTML Helper method?
21. Which of these is a property of OutputCache attribute?
22. What is the purpose of _ViewStart.cshtml?
23. Where are the routing rules defined in an asp.net MVC application?
24. Recipe is available in:
25. An MVC application can have a:
26. Which static class could you use to enable OAuth support for clients such as Twitter & Facebook?
27. Which of the following is NOT a member of the UrlHelper class.
28. RenderAction method is used to:
29. When you implement your own Model Binder, what method do you have to implement?
30. How do you prevent forgery of a request?
31. When declaring routes, what are constraints used for?
32. Any method that is decorated with ChildActionOnlyAttribute can be called ONLY using:
33. Which class is used by the MVC pipeline to call a resolved controller's action as the result of a HTTP request?
34. How do you catch unhandled action exceptions in a controller?
35. What is ChildActionOnlyAttribute?
36. Which HTML Helper would you use if you want the MVC engine to dynamically generate a form for an entire object based upon the metadata of the object's type?
37. If you wish to write a module for your own custom logging or message headers, which interface could you implement?
38. You are developing an ASP.NET MVC application that will be deployed on a web farm. Passwords must be stored in the web.config file and must not be readable or in a format that is easily decodable You need to encrypt the passwords that are stored in the web.config file. Which command-line tool should you use?
39. The UIHint attribute is used to do what?
40. Which class could you use to create rules for using custom display modes?
41. Which of the following is NOT a way to pass information from a controller to a view to be used by the razor view engine?
42. Which of these are NOT conditions in which it's recommended to use asynchronous methods?
43. If you want to setup custom configuration for a controller (formatters, model binders, etc.) which interface would you attribute need to implement?
44. If you wish to genrate links to related resources to add hypermedia to your REST service, what class could you use?
45. What class would you derive from if you wish to create a custom type for Web API's HTTP Content Negotiation?
46. You are developing an ASP.NET MVC application. The application is deployed in a web farm and is accessed by many users. The application must handle web server failures gracefully. The servers in the farm must share the short-term state information. You need to persist the application state during the session. What should you implement?
47. Which of these is NOT an view engine for MVC?
48. ActionResult is:
49. By default, where is TempData stored?
50. MVC Filters can only be applied to Actions
51. If you wish to use a custom IoC container when the ASP.NET MVC engine is generating instances of your controller, what interface would you implement?
52. If you wish to leverage the OData standards for querying your REST service, what attribute could you use on your ApiController action?
53. If you wish for a ApiController action to be used for many different HTTP Verbs, which attribute would you set?
54. If you wish to create a Web API controller, what class would you derive your controller from?
55. Which class is NOT a child of ActionResult?
56. What is OutputCacheAttribute used for?
57. Tempdata is used to:
58. What attribute is used to handle an exception that is thrown by an action method?
59. If you wanted to use a partial view but also pass the same model object from the parent view, what HTML Helper would you use?
60. Which class would you return from a Controller action when performing partial page updates?
61. [WebMethod] Attribute is required when calling an MVC Action with AJAX
62. Which class represents an initial HTTP class to the Web API framework?
63. You are writing an action method called AddProduct inside the Product controller. The logic in your code indicates that you need to call the Cart controller’s Add method as a result of your controller’s action method. Which line of code would accomplish this?
64. Which class represents the result of a HTTP call to the Web API framework?
65. If you have restricted a Controller so that all actions require the user to be authorized, how can you indicate that a specific action should be available without authorization?
66. You are developing an ASP.NET MVC application. You need to authenticate clients by using NT LAN Manager (NTLM). Which authentication method should you implement?
67. If you have a _Layout.cshtml file in your shared views, which file can you create to have custom layout for mobile platforms?
68. How is a model passed to a controller action validated?
69. What property could you set on the OutputCache attribute to indicate that you want it to instantiate new caches for different combinations of parameters to the Controller action method?
70. If you wish to include custom transformation logic in your Bundles, which interface could you implement?
71. To accommodate large projects, ASP.NET MVC lets you partition Web applications into smaller units that are referred to as?
72. What is the type of the ViewBag property?
73. How can you specify that a particular View should not use any implicitly set Layout View?
74. Which of the following protocols are not supported by WCF?
75. What attribute is used to restrict access by callers to an action method?
76. Which namespace contains the attributes used to describe your model and it's properties?
77. What enum represents a strongly-typed collection of the HTTP Status Codes?
78. What is the first filter run in a controller action?
79. Which attribute could you use if you had a string property on your Model class named FirstName, but you want the labels for this property in your view to use the text "First Name"?
80. Which of the following regular expressions can be used as a constraint so that the route will match only when the "productId" parameter is numeric?
81. How do you prevent routing?
82. Which method in the RouteCollection can be used to prevent MVC from processing specific file types?
83. Which attribute could you use if you had a Phone Number property on your model and you wanted to validate the value against the United States phone format?
84. Which of these emulators are valid mobile emulators for MVC applications?
85. In MVC, Which represents data that you want to have displayed on viewpage?
86. Which Razor construct is used to indicate a view is strongly-typed
87. When creating a data-entry view for new data, which two HTTP request verbs (methods) should you anticipate using to serve the form to the user and allow the user to submit the form?
88. What is the default view engine that comes with MVC3?
89. True or False: By default, all controller classes must be named by using the "Controller" suffix.
90. The order in which routes are defined matters.
91. How can you restrict access to a Controller action so that only authorized users can call that action?
92. The MVC framework is defined in which namespace?
93. Which symbol[s] is used to designate Razor syntax code in a .cshtml file?
94. True or False? It is best practice to use model binding instead of manually parsing the request.
95. Which base class can be used for the return value of a MVC action method?
96. Which HTML Helper would you use to create a form element in a View?
97. Which of these formats is not supported out of the box by Web API?
98. A controller action can return:
99. What is the core process of rolling up a number of distinct resources together into a single downloadable resource in ASP.NET MVC?
100. Where is data validation done?
Microsoft SQL Server
Microsoft Silverlight
MongoDB
Networking
OOPS Concepts
Objective C
Related MCQ's