URL cara terbaik merutekan visual studio C#

url ini berfungsi dengan baik http://localhost:64333/get/5/6/1

tapi url ini tidak berfungsi http://localhost:64333/get/5/6/index-1.shtml tampilkan halaman 404 tidak ditemukan

   routes.MapRoute(
                 "OnlyAction",
                "{action}/{id}/{sub_id}/{page_no}",
                new { controller = "Home", action = "Index", id = UrlParameter.Optional, sub_id = UrlParameter.Optional, page_no = UrlParameter.Optional }
                ); 
 routes.MapRoute(
               name: "Idpages",
               url: "{action}/{id}/index-{page_no}.shtml",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional, sub_id = UrlParameter.Optional, page_no = UrlParameter.Optional }
                );
            routes.MapRoute(
              name: "subIdPages",
              url:   "{action}/{id}/{sub_id}/index-{page_no}.shtml",
               defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional, sub_id = UrlParameter.Optional, page_no = UrlParameter.Optional }
                ); 

person Jasveer Singh    schedule 03.07.2021    source sumber
comment
Jika Anda ingin MapRoute ke file html, Anda bisa merujuk ke jawaban pertama di tautan C# .net MapRoute ke file html   -  person Jack J Jun - MSFT    schedule 05.07.2021