I have an URL like this /home/action/id
How can I access this id in view?
This should work in your view:
<%= this.ViewContext.RouteData.Values["id"] %>
(assuming the route parameter is named "id")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With