MVC-各种传值方式
摘要:
示例一:ViewData传值.HomeController.cs Code:publicActionResult Index(){ ViewData["Title"] ="Home Page"; ViewData["Message"] ="Welcome to ASP.NET MVC!";returnView();}Views/Home/Index.aspx Code: 结果:在页面上显示Welcome to ASP.NET MVC!示例二:带参数传值.URL Routing规则:routes.MapRoute(& 阅读全文
posted @ 2013-09-02 16:31 梦想的尾巴 阅读(497) 评论(0) 推荐(0) 编辑