What does the symbol ? mean in a URL?

南笙酒味 提交于 2019-12-18 06:16:48

问题


What does the symbol ? mean in a URL?


回答1:


That portion of the URL (ie. after the ?) is known as the query string.
http://en.wikipedia.org/wiki/Query_string

It is used to pass parameters into web applications.

For example, in ASP.NET I might have an .aspx page like so:
http://example.com/myapp/default.aspx

Inside my codebehind for that page I can look for the presence of any query string parameters:

string paramValue = Request.QueryString["param"];

So if someone visits my page with the URL of http://example.com/myapp/default.aspx?param=abcd
Then the value of paramValue will be "abcd".




回答2:


RFC for http protocol, section 3.2.2 http URL

"?" - is delimiter between "absolute path" and "query"



来源:https://stackoverflow.com/questions/5307548/what-does-the-symbol-mean-in-a-url

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!