I have this controller
public ViewResult Hotel(string hotelSupplierCode, bool displayAllRooms, bool resend)
{
HotelModel model;
if (resend)
{
model = (HotelModel)Session["HotelDetails"];
HotelManager.ResendHotel(model.Hotel.Id);
model.Hotel.Status = 1;
}
else
{
model = HotelModel.GetGotel(hotelSupplierCode, displayAllRooms);
}
Session["HotelDetails"] = model;
return View("Hotel", model);
}
and this routing
routes.MapRoute(
"Hotel", // Route name
"{controller}/{action}/{hotelSupplierCode}/{displayAllRooms}/{resend}", // URL with parameters
new { controller = "Hotel", action = "Hotel", hotelSupplierCode = UrlParameter.Optional, displayAllRooms = UrlParameter.Optional, resend = UrlParameter.Optional }
The problem is that when I access the view the returned URL is soemthing like that
http://localhost:495...se&resend=False, but I want to look like that
http://localhost:495...711/False/False.
If I put the last link manualy it works fine. How can I hide the parameters name from URL?

New Topic/Question
Reply



MultiQuote


|