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.
If you're using JavaScript in the browser you can get the full current URL by using window. location. href .
To get the current URL I am using the following C# instruction: Uri address = new Uri(Request. Host.
Use the HttpRequest.Url.PathAndQuery Property to retrieve the absolute path and query like so:
<%= Request.Url.PathAndQuery %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With