Home how to match all request urls with a signle action with using asp.net mvc routes
Reply: 0

how to match all request urls with a signle action with using asp.net mvc routes

TheEmpty
1#
TheEmpty Published in 2017-09-14 09:25:31Z

I want all request urls are matched by a default action , how to do this with using mvc routes ?

Here is my config:

routes.MapRoute(
    "Default",
    "{controller}/{action}/{id}",
    new { controller = "Home",action = "Index", id = UrlParameter.Optional },
    new { controller = "(w+)*", action = "(w+)*" }
);

i want all request be executed with Home/Index , but this didn't work .

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.301573 second(s) , Gzip On .

© 2016 Powered by cudou.com design MATCHINFO