I have run into a trivial(?) problem when trying to get the whole URL of a c# page.
The url contains the “#”-link ref char. And i would like that to when I grab the URL
Eg. http://localhost/site/page.aspx?var=1&var=2#link
I have tried Request.URL, Request.Querystring etc, it only returns up to the “#”-char.
Is there any way to grab even the last part?
Thanks in advance
Your problem is that # specified an anchor in the page, so the browser sees:
And then looks in the page for
As this is client side you need to escape the # from the URL – you can’t get it on the server because the browser’s already stripped it off.