MVC中Controller中的跳转
2016-07-26 20:24
204 查看
Controller中跳转方式:
1、Response.Redirect("/Custom2/Index");
2、return Redirect("/Custom2/Index");
3、return RedirectToAction("/Custom2/Index")
多个重载,其中传递参数:
return RedirectToAction("Come", "Custom", new Person { Id = "0", Name = "asdf" });
Custom中Action(Come)
public ActionResult Come(Person p)
{
return View();
}
1、Response.Redirect("/Custom2/Index");
2、return Redirect("/Custom2/Index");
3、return RedirectToAction("/Custom2/Index")
多个重载,其中传递参数:
return RedirectToAction("Come", "Custom", new Person { Id = "0", Name = "asdf" });
Custom中Action(Come)
public ActionResult Come(Person p)
{
return View();
}
相关文章推荐
- 再谈‘进程’
- 网编基础(2)
- bootstrap3上传特效
- paper 92:Lena与图像处理
- 在 Laravel 5 中使用 Laravel Excel 实现 Excel/CSV 文件导入导出功能
- iOS资源大全中文版
- 超详细JSTL标签 参考手册
- Android控件属性
- Linux常见知识
- paper 91:边缘检测近期最新进展的讨论
- 何教授去雾算法C++实现(调试)
- [Python] 技术贴系列之——Django部署方案简介
- MAC地址特殊规定--设置MAC地址时需要有非法MAC设置判断,否则会导致网卡无法启动
- 最短路算法spfa hdu 1863
- 记录在写学术论文时使用MATLAB制作折线图
- HDOJ 4907 Task schedule【思维】
- 你对C语言的关键字,知多少
- HDU 5754 博弈(威佐夫博弈)
- 【leetcode】319. Bulb Switcher
- 删除数组中特定元素推荐做法