If I have an a Action parameter I can pass a value to it from the View like " asp-route-origin="Owner" ". However, how can I retrieve the value that's already set in the URL for that parameter? I know I can retrieve the default route id in the controller from the view (1?origin=Owner) like:
var foo = Url.ActionContext.RouteData.Values["id"]; //==1 (considering the parenthesis above)
var foo = Url.ActionContext.RouteData.Values["id"]; //==1 (considering the parenthesis above)
But replacing id by the desired parameter name ("origin") doesn't seem to work. What should I be doing here? I thought that the same way I do: