符号是什么?在 URL 中是什么意思? [英] What does the symbol ? mean in a URL?

查看:66
本文介绍了符号是什么?在 URL 中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

符号是什么?在 URL 中的意思是?

What does the symbol ? mean in a URL?

推荐答案

URL 的那部分(即 ? 之后)称为查询字符串.
http://en.wikipedia.org/wiki/Query_string

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

用于向 Web 应用程序传递参数.

It is used to pass parameters into web applications.

例如,在 ASP.NET 中,我可能有一个 .aspx 页面,如下所示:
http://example.com/myapp/default.aspx

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"];

因此,如果有人使用 http://example.com/的 URL 访问我的页面myapp/default.aspx?param=abcd
那么 paramValue 的值将是abcd".

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

这篇关于符号是什么?在 URL 中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆