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
  • 相关阅读:
    用户组
    Compose
    ubuntu下不同版本python安装pip及pip的使用
    rest-framework-@action()装饰器
    数据库数据导出CSV文件,浏览器下载
    爬取拉钩网信息
    CSV模块
    DOM对象之查找标签&属性操作
    Java内存模型 一
    SQL优化之一
  • 原文地址:https://www.cnblogs.com/devgis/p/14181178.html
Copyright © 2011-2022 走看看