Reputation: 39
I use Request.QueryString["var"] to pull the value of http://test.com/test.aspx?var=test into a string
the same thing doesn't work for test.aspx#var=test
how can I get it from that version of a querystring?
Upvotes: 0
Views: 4467
Reputation: 6825
The Fragment Identifier (#) is client-side only, you can't get that from server side code.
Upvotes: 6
Reputation: 36310
I don't think the part of the url after the # is passed to the web server directly. To access it you would need to do some javascript processing to pass it on.
Upvotes: 0
Reputation: 161783
#var=test
is not q query string. That's part of the "URL Fragment". In a URL to a web page, it indicates which <a>
tag to go to.
Upvotes: 1