ASP.NET MVC 个人学习笔记之 Controller传值
生活随笔
收集整理的這篇文章主要介紹了
ASP.NET MVC 个人学习笔记之 Controller传值
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
?//ControllerViewBag.Message?=?"Modify?this?template?to?jump-start?your?ASP.NET?MVC?application."; //?View<section?class="featured"><div?class="content-wrapper"><hgroup?class="title"><h1>@ViewBag.Title.</h1><h2>@ViewBag.Message</h2></hgroup>...第二種方法是viewdata
//Controller public?ActionResult?Index(){ViewBag.Message?=?"Modify?this?template?to?jump-start?your?ASP.NET?MVC?application.";ViewData["TEST"]?=?"這是一個例子!";return?View();} ?<section?class="featured"><div?class="content-wrapper"><hgroup?class="title"><h1>@ViewBag.Title.</h1><h2>@ViewBag.Message</h2><h2>@ViewData["TEST"]</h2></hgroup>viewbag與viewdata區別
http://www.cnblogs.com/wintersun/archive/2012/01/21/2328563.html
看看著篇博文吧,很不錯!
轉載于:https://my.oschina.net/love404/blog/413580
總結
以上是生活随笔為你收集整理的ASP.NET MVC 个人学习笔记之 Controller传值的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IAR切BANK--程序中的使用
- 下一篇: python snap7 plc db_