Please help me to get query string value from the URL.
http://test.com/test.aspx#id=test
I tried to access with
Request.QueryString["id"]
Its getting null value.Please suggest how to access id from the url.
Thanks
If you're wondering whether this twisty series is renewed for Season 7, sadly, the answer is no. ABC decided Season 6 would be the final season of the show, which means the Season 6 finale was the series finale, and we won't be getting another year of Annalise Keating (Viola Davis).
Right now you can watch How to Get Away with Murder on Netflix. You are able to stream How to Get Away with Murder by renting or purchasing on Amazon Instant Video, iTunes, Google Play, and Vudu.
A query string starts with a question mark ?
not a hash #
.
Try:
http://test.com/test.aspx?id=test
Using a hash, you're asking to jump to a named anchor within the document, not providing a query string
I agree with everyone that the #
should be a ?
, but just FYI:
Note it isn't actually possible get the anchor off the URL, for example:
http://test.com/test.aspx#id=test
The problem is that # specified an anchor in the page, so the browser sees:
http://test.com/test.aspx
And then looks in the page for
<a id="test">Your anchor</a>
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.
If you want the part after the # you have to copy it using Javascript before the request is sent to the server, and put the value in the querystring.
More info here c# get complete URL with "#"
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