korben
korben

Reputation: 39

how to get value of a #t=querystring in asp.net?

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

Answers (3)

Shawn Steward
Shawn Steward

Reputation: 6825

The Fragment Identifier (#) is client-side only, you can't get that from server side code.

Upvotes: 6

Rune Grimstad
Rune Grimstad

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

John Saunders
John Saunders

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

Related Questions