Asp.net MVC 4 动作方法结果

简介: 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. 通用的返回值的一个动作,是用来代表的动作方法执行框架级操作。

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.

要为网页渲染视图。

目录
相关文章
|
3月前
|
开发框架 前端开发 .NET
ASP.NET CORE 3.1 MVC“指定的网络名不再可用\企图在不存在的网络连接上进行操作”的问题解决过程
ASP.NET CORE 3.1 MVC“指定的网络名不再可用\企图在不存在的网络连接上进行操作”的问题解决过程
38 0
|
29天前
|
开发框架 前端开发 .NET
进入ASP .net mvc的世界
进入ASP .net mvc的世界
28 0
|
29天前
mvc.net分页查询案例——mvc-paper.css
mvc.net分页查询案例——mvc-paper.css
5 0
|
1月前
|
开发框架 前端开发 .NET
C# .NET面试系列六:ASP.NET MVC
<h2>ASP.NET MVC #### 1. MVC 中的 TempData\ViewBag\ViewData 区别? 在ASP.NET MVC中,TempData、ViewBag 和 ViewData 都是用于在控制器和视图之间传递数据的机制,但它们有一些区别。 <b>TempData:</b> 1、生命周期 ```c# TempData 的生命周期是短暂的,数据只在当前请求和下一次请求之间有效。一旦数据被读取,它就会被标记为已读,下一次请求时就会被清除。 ``` 2、用途 ```c# 主要用于在两个动作之间传递数据,例如在一个动作中设置 TempData,然后在重定向到另
95 5
|
3月前
|
XML 前端开发 定位技术
C#(NET Core3.1 MVC)生成站点地图(sitemap.xml)
C#(NET Core3.1 MVC)生成站点地图(sitemap.xml)
25 0
|
3月前
|
前端开发
.net core mvc获取IP地址和IP所在地(其实是百度的)
.net core mvc获取IP地址和IP所在地(其实是百度的)
123 0
|
5月前
|
开发框架 自然语言处理 前端开发
基于ASP.NET MVC开发的、开源的个人博客系统
基于ASP.NET MVC开发的、开源的个人博客系统
51 0
|
8月前
|
存储 开发框架 前端开发
[回馈]ASP.NET Core MVC开发实战之商城系统(五)
经过一段时间的准备,新的一期【ASP.NET Core MVC开发实战之商城系统】已经开始,在之前的文章中,讲解了商城系统的整体功能设计,页面布局设计,环境搭建,系统配置,及首页【商品类型,banner条,友情链接,降价促销,新品爆款】,商品列表页面,商品详情等功能的开发,今天继续讲解购物车功能开发,仅供学习分享使用,如有不足之处,还请指正。
114 0
|
9月前
|
开发框架 前端开发 .NET
[回馈]ASP.NET Core MVC开发实战之商城系统(三)
[回馈]ASP.NET Core MVC开发实战之商城系统(三)
67 0
|
9月前
|
开发框架 前端开发 .NET
[回馈]ASP.NET Core MVC开发实战之商城系统(一)
[回馈]ASP.NET Core MVC开发实战之商城系统(一)
113 0