Routing Url that has no action name

150 views Asked by At

How to route this url http://localhost:1986/en/Hotel/#forward

to

controller = "Hotel",
action = "Results"

Since I need to refresh this page when the user sign in from this page, I need to redirect to the above said controller/action.

Please help

1

There are 1 answers

0
gjijo On

I have found some solution my self

routes.MapRoute(
   "HotelResultAfterFlightSelection1", // Route name
   "Hotel/Results/{tripid}", // URL with parameters
   new
   {
       controller = "Hotel",
       action = "Results",
       tripid = UrlParameter.Optional
   }
);
routes.MapRoute(
   "HotelResultAfterFlightSelection2", // Route name
   "Hotel", // URL with parameters
   new
   {
       controller = "Hotel",
       action = "Results"
   }
);