Which type should you return from the action method?

You are developing an ASP.NET MVC 2 Web application.
A page makes an AJAX request and expects a list of company names in the following format.

[“Adventure Works”,”Contoso”]

You need to write an action method that returns the response in the correct format.
Which type should you return from the action method?

You are developing an ASP.NET MVC 2 Web application.
A page makes an AJAX request and expects a list of company names in the following format.

[“Adventure Works”,”Contoso”]

You need to write an action method that returns the response in the correct format.
Which type should you return from the action method?

A.
AjaxHelper

B.
XDocument

C.
JsonResult

D.
DataContractJsonSerializer



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Harsimran Singh Dhami

Harsimran Singh Dhami

Its JsonResult
(C)