日期:2014-05-17 浏览次数:20446 次
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
{
public ActionResult About(int? id1,string name,int? id)
{
return View();
}
}