Get the full hash URL to use as ReturnUrl

I have a URL like this

localhost/Login/LogOn?ReturnUrl=/#&q=my%20search%20word&f=1//447044365|2//4 

I need to get the hash parameters for navigation in the application after authentication.

I'm trying to catch it

 <input name="returnUrl" value="<%= ViewContext.HttpContext.Request.Url.PathAndQuery %>" type="hidden" /> 

But the result

 /Login/LogOn?ReturnUrl=/ 

I tried to remove the "/ #" in the URL, after which I get the full URL. But I need to use this URL as is.

Why was the URL cut?

+8
c # url returnurl
source share
1 answer

The browser does not send a hash fragment to the server. It is used only on the client side. If you need it, you will have to access it through the client version of the script.

+18
source share

All Articles