zoukankan      html  css  js  c++  java
  • ASP.NET MVC ActionResult

    MVC内置了很多实用的ActionResult
    Action Result
    Helper Method
    Description
    ViewResult
    View
    Returns a view as a webpage
    PartialViewResult
    PartialView
    Returns a partial view. A partial view has the same role as a user control. A partial view will be rendered within a main view
    RedirectResult
    Redirect
    Redirects to another action method based on 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
    FileStreamResult
    File
    Returns a file stream
    FilePathResult
    File
    Returns a file path
    FileContentResult
    File
    Returns the content of a file
    EmptyResult
    (None)
    Used with void action methods which doesn’t return a value
    HttpStatusCodeResult
     
    Returns an HTTP Status code
    HttpNotFoundResult
     
    Returns HTTP Not Found
    HttpUnauthorizedResult
     
    Return HTTP Not Authorized
  • 相关阅读:
    HDU5586 最大连续和 xingxing在努力
    HDU5587 递推式+二分 xingxing在努力
    HDU2639 第k小01背包 xingxing在努力
    Java面向对象之继承
    Java面向对象之封装
    Java面向对象之封装
    Java流程控制语句
    Java流程控制语句
    Java运算符
    Java运算符
  • 原文地址:https://www.cnblogs.com/devgis/p/14181178.html
Copyright © 2011-2022 走看看