Pages

Thursday, October 9, 2014

ASP.NET MVC Question and Answer Part-4

Here are few ASP.NET MVC interview question and answer which are very useful to clear eLance test.

1- Which class would you return from a Controller action when performing partial page updates?

A- ActionResult
B- PartialViewResult
C- PartialResult
D- ViewResult

Answer-B

2- What is the core process of rolling up a number of distinct resources together into a single downloadable resource in ASP.NET MVC?

A- Joining
B- Bundling
C- Compacting
D- Hashing
E- Merging

Answer-B

3- In MVC, Which represents data that you want to have displayed on viewpage?

A-Domain Model
B-Json Model
C-Data Model
D-View Model

Answer-D

4- Which HTML Helper would you use to create a form element in a View?

A- FormBegin
B- FormGenerate
C- BeginForm
D- Form

Answer-C

5- A controller action can return:

A- All answers are correct.
B- ContentResult
C- JavascriptResult
D- ViewResult

Answer-A

6- Which Razor construct is used to indicate a view is strongly-typed

A- @entity
B- @context
C- @type
D- @model

Answer-D

7- Tempdata is used to:

A- pass data between two consecutive requests
B- pass data from the view to the controller action
C- pass data from controller action to the view

Answer-A

8- Which of these emulators are valid mobile emulators for MVC applications?

A- All of these
B- Opera Mobile Emulator
C- Apple Safari
D- Windows 7 Phone Emulator

Answer-A

9- What is OutputCacheAttribute used for?

A- To skip method execution until cached output expires.
B- None of the answers
C- To notify client browser that output shall be cached.
D- To mark an action method whose output will be cached.

Answer-D

10- If you want to setup custom configuration for a controller (formatters, model binders, etc.) which interface would you attribute need to implement?

A- IControllerConfiguration
B- IConfiguration
C- IControllerSettings
D- IController

Answer-A

11- 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?

A- A local database
B- ASP.NET session state
C- A state server
D- Profile properties

Answer-C

No comments:

Shared Button