How do get the current url in a renderaction
When I get the cu开发者_如何学编程rrent 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()
精彩评论