Areas が VS11 に含まれているのか、MVC4 に含まれているのかはわかりませんが、大きなプロジェクトを編成するには非常に適しているようです。しかし、エリア内のコントローラーへのリンクに問題があります。
編集:これは現在機能しており、コードが更新されています
ここに私のプロジェクトのスクリーンショットがありますhttp://www.gratisimage.dk/graphic/images/2011/October/30/724D_4EAD44CD.jpg
私は2つのリンクを持っています
@Html.ActionLink("Create Vehicle", "CreateVehicle", "Vehicle", new { area = "Units" }, null)
@Html.ActionLink("Index", "Index", "Vehicle", new { area = "Units" }, null)
そして私のコントローラー
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace unoeurotest.Areas.Units.Controllers
{
public class VehicleController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult CreateVehicle()
{
return View();
}
}
}