开发者

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

开发者 https://www.devze.com 2022-12-31 03:11 出处:网络
I use Request.QueryString[\"var\"] to pull the value of http://test.com/test.aspx?var=test into a string

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 f开发者_如何学编程rom that version of a querystring?


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


#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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消