How do you get the current path (url) from within an asp.net mvc view?
If there isn't a way to get it in the view, how can you get it in a controller so that it can be passed to the view?
I don't want the protocol and host portion of the url.
This will return the url in the view for you:
'<%=Url.RouteUrl(ViewContext.RouteData.Values)%>
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