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?