MVC。Action方法,常用的返回类型有几种?
2024-08-24 09:40:24
常用的:
1,string,直接返回响应报文字符串
public ActionResult test()
{
return "哈哈";
}
2.ViewResult,ActionResult--返回视图对象
public ActionResult Test()
{
return View();
}
或者
public ViewResult Test()
{
return View();
}
3.JsonResult--返回json字符串
最新文章
- java IO流 之 其他流
- 行程编码(atoi函数)
- BZOJ 4581: [Usaco2016 Open]Field Reduction
- linuxz终端开启echo颜色显示
- dede使用方法----如何转换时间戳
- iOS-马上着手开发iOS应用应用程序-第二部分构建应用程序
- Daily Scrum 10.26
- Linux 网卡设备驱动程序设计(3)
- MySQL支持Emoji表情
- FTP服务器简易有效的访问方法
- excel运行最多行数
- JAVA字符串转日期或日期转字符串
- C#实现防拷贝工具示例
- 使用原生php读写excel文件
- 1-3 Spring Bean 的属性值设置
- 单幅图像的深度学习,对NYU数据集进行划分
- HTML的概念和三大基石以及标准文档结构
- GhostScript应用一例:使用GhostScript强行修改加密PDF
- sticky footer
- You Only Look Once: Unified, Real-Time Object Detection
热门文章
- .NET Core:面向未来的开源跨平台开发技术
- A cycle was detected in the build path of project
- Run same command on all SQL Server databases without cursors
- Navicat for MySQL Mac 破解版
- hao.360.cn不停跳....
- [转]YII2 常用数据库操作
- nginx+lua_nginx+GraphicsMagick生成实时缩略图
- make no mistake, we are the last line of defense.
- WCF多种调用方式兼容
- Windows Storage Server 2008 R2 Standard(64位)之ASM(Automated Storage Manager)管理