日期:2014-05-17 浏览次数:20563 次
public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); }
public class HomeController : Controller { // // GET: /Home/ public ActionResult Index() { return View(); } public ActionResult Index2() { return View(); } public ActionResult Index3() { return View(); } }