1
考慮控制器CustomerController.cs
上兩種方法:ASP.NET MVC:路由幫助
//URL to be http://mysite/Customer/
public ActionResult Index()
{
return View("ListCustomers");
}
//URL to be http://mysite/Customer/8
public ActionResult View(int id)
{
return View("ViewCustomer");
}
- 你如何設置你的路由,以適應這一要求?
- 如何在創建指向View頁面的鏈接時使用Html.ActionLink?