When I get the current url in a renderaction using
Request.Url.ToString()
It returns the url of the renderaction and not the page. Is there a way to get the current url of the page?
When I get the current url in a renderaction using
Request.Url.ToString()
It returns the url of the renderaction and not the page. Is there a way to get the current url of the page?
Use the ParentActionViewContext
property:
ParentActionViewContext.HttpContext.Request.Url.ToString()