Asp.net MVC 4 动作方法结果

时间:2023-12-23 16:56:50

Action Method Result动作方法结果

ActionResult

generic return value for an action and is used to perform a framework-level operation on behalf of the action method.

通用的返回值的一个动作,是用来代表的动作方法执行框架级操作。

ContentResult

To return a user-defined content type that is the result of an action method.

要返回用户定义的内容类型的操作方法是这样的结果。

EmptyResult

To return nothing from a Controller action

从控制器动作返回空

FileContentResult

Sends the contents of a binary file to the response.

一个二进制文件中的内容发送到响应中。

FilePathResult

Sends the contents of a file to the response.

一个文件中的内容发送到响应中。

FileResult

To return the content of a file to the browser

要返回的内容的一个文件浏览器

FileStreamResult

Sends binary content to the response by using a Stream instance.

二进制内容发送到响应通过使用流实例。

HttpNotFoundResult

To return 404 status-code to indicate that the requested resource was not found.

要返回404状态代码表示请求的资源没有被发现。

HttpStatusCodeResult

To return specific HTTP response status code and description.

若要返回特定HTTP响应状态代码和说明。

HttpUnauthorizedResult

To return 401 status code to indicate unauthorized HTTP request.

要返回401状态代码表示授权的HTTP请求。

JsonResult

To return a serialized JSON object.

要返回一个序列化的JSON对象。

JavaScriptResult

To return a script that can be executed on the client.

返回一个脚本,可以在客户端上执行。

PartialViewResult

To render a partial view (fx. just a user control)

若要呈现局部的视图(只是一个用户控制)

RedirectResult

To redirect to a specified URI.

要重定向到指定的URI。

RedirectToRouteResult

to redirect to a route

重定向路由

ValueProviderResult

Represents the result of binding a value (such as from a form post or query string) to an action-method argument property, or to the argument itself.

代表绑定值到一个动作方法的参数属性(如从表单Post或查询字符串),或者参数本身的结果。

ViewEngineResult

Represents the result of locating a view engine.

代表定位视图引擎的结果。

ViewResult

To Render a view as a Web page.

要为网页渲染视图。