Sunday, August 1, 2010

Built-in action result types

Source :http://msdn.microsoft.com/en-us/library/dd410269.aspx

ViewResult
View
Renders a view as a Web page.

PartialViewResult
PartialView
Renders a partial view, which defines a section of a view that can be rendered inside another view.

RedirectResult
Redirect
Redirects to another action method by using its URL.

RedirectToRouteResult
RedirectToAction

RedirectToRoute
Redirects to another action method.

ContentResult
Content
Returns a user-defined content type.

JsonResult
Json
Returns a serialized JSON object.

JavaScriptResult
JavaScript
Returns a script that can be executed on the client.

FileResult
File
Returns binary output to write to the response.

EmptyResult
(None)
Represents a return value that is used if the action method must return a null result (void).

No comments: