I have defined Details method in Pro controller and i want to map this method to multiple types of url.
Please check below code, i have tried on another method with one parameter and it is working but in this case it's not working with multiple optional parameter.
[Route("Vehicles/Details/{no}/{aTab?}/{rs?}/{fp?}")]
[Route("Pro/Details/{no}/{aTab?}/{rs?}/{fp?}")]
[Authorization(SA.PMV, Rights.View)]
public ActionResult Details(string no, string aTab, string rs, bool fp = false)
{
return View();
}
Error Showing in debugging:
A public action method 'Details' was not found on controller 'ProController'.
when I request the following URL:
http://www.example.com/Pro/Details?no=sT90Fjts0qI$&aTab=viewdetails&rs=viewdetails&fp=false