1
我希望能夠訪問同一頁面兩種不同的方式:創建兩個路線選擇到同一個頁面(MVC)
首先,用一個參數,顯示一些特定的信息。
routes.MapRoute(
"About",
"About/{id}",
new { controller = "About", action = "Index" }
);
二,沒有參數,顯示一般的東西。
routes.MapRoute(
"About",
"About",
new { controller = "About", action = "Index" }
);
我該如何構建接受這兩個選項的路線?