14

I have following Url:

customer/login?ReturnUrl=home

How can I get this string in my view? I tried

RouteData.GetRequiredString("action")

But it does not return full string. Any help will be appreciated.

Tae-Sung Shin
  • 20,215
  • 33
  • 138
  • 240

1 Answers1

28

Use the HttpRequest.Url.PathAndQuery Property to retrieve the absolute path and query like so:

<%= Request.Url.PathAndQuery %>
jdavies
  • 12,784
  • 3
  • 33
  • 33