asp.net mvc - Mvc routing in for multiple controllers -
i have 2 routes in global file. route propertydetails working fine doesn't works booking links used are. idea why not working
@html.actionlinkwithspan("booknow", "create", "booking", new {item.productid,item.productname},"gradient-button") @html.actionlinkwithspan("moredetails", "index", "propertydetails", new {item.productid,item.productname},"") routes.maproute( "booking", "book/{productid}/{productname}", new { controller = "bookingcontroller", action = "create", productname = urlparameter.optional } ); routes.maproute( "propertydetails", "details/{productid}/{productname}", new { controller = "propertydetails", action = "index", productname = urlparameter.optional } );
ok got ... replaced
routes.maproute( name: "booking", url: "{controller}/{productid}/{productname}", defaults: new { controller = "bookingcontroller", action = "create", productid = urlparameter.optional } );
Comments
Post a Comment