views:

28

answers:

1

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?

+1  A: 

Use the ParentActionViewContext property:

ParentActionViewContext.HttpContext.Request.Url.ToString()
SLaks