标签: c# asp.net-mvc-2
当我使用
Request.Url.ToString()
它返回渲染的url而不是页面。有没有办法获取页面的当前网址?
答案 0 :(得分:1)
使用ParentActionViewContext属性:
ParentActionViewContext
ParentActionViewContext.HttpContext.Request.Url.ToString()