Get Parameter From URL (MVC)
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:
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:
I could do:
But origin seems to be null.
Thanks for the help.
1 Reply
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View