您的位置:首页 > Web前端

the difference of ViewResult and ActionResult

2012-06-05 09:19 411 查看
ActionResult is an abstract class that can have several subtypes:

a) ViewResult - Renders a specifed view to the response stream

b) PartialViewResult - Renders a specifed partial view to the response stream

c) EmptyResult - An empty response is returned

d) RedirectResult - Performs an HTTP redirection to a specifed URL

e) RedirectToRouteResult - Performs an HTTP redirection to a URL that is determined by the routing engine, based on given route data

f) JsonResult - Serializes a given ViewData object to JSON format

g) JavaScriptResult - Returns a piece of JavaScript code that can be executed on the client

h) ContentResult - Writes content to the response stream without requiring a view

i) FileContentResult - Returns a fle to the client

j) FileStreamResult - Returns a fle to the client, which is provided by a Stream

k) FilePathResult - Returns a fle to the clien
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐