标签:
方法有两种
test1的view页面
@html.actionlink("参数传递","test2/1","html")
1在test2 的controller中获取
public ActionResult test2(int id)
{
ViewData["id"] = id;
return View();
}
2在test2的view 中获取
@html.viewcontext.routedata.values["id"]
标签:
原文地址:http://www.cnblogs.com/dh2014/p/4821125.html