本文转自:http://blog.csdn.net/hulihui/article/details/48199897 有时需要在ASP.NET MVC4的视图的@model中使用多个类型的实例,.NET Framework 4.0版本引入的System.Tuple类可以轻松满足这个需求. 假设Person和Product是两个类型,如下是控制器代码. using System; using System.Web.Mvc; namespace Razor.Controllers { public
<1> 控制器 </pre><pre name="code" class="csharp">using MvcTest.Models; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace MvcTest.Controllers { public cla