Reputation: 369
In my MVC app I have two paths with a similar pattern and my route config file has methods like below.
routes.MapRoute(
name: "Route1",
url: "bookings/{username}",
defaults: new { controller = "Booking", action = "UserBooknigs" }
);
routes.MapRoute(
name: "Ruote2",
url: "bookings/{username}/{id}",
defaults: new { controller = "Booking", action = "LoadBooking" }
);
whichever path I access it calls both actions. How can I avoid this issue?
Upvotes: 0
Views: 101