asp.net MVC Views-----Controller傳遞數據方法
1.ViewData:C傳遞數據到V中:ViewData["studentList"]=studentList;
V接收C傳來的數據:var stu=(Student)ViewData["studentList"];
2.ViewBag:C---------->V:ViewBag._product=p;
接收:var p=(product)ViewBag._product;
3.model:C--------------V:return View(p);
接收:@model student
[email protected]
[email protected],
[email protected],
asp.net MVC Views-----Controller傳遞數據方法