从 ASPX 中的 URL 检索 GET 变量 [英] Retrieve GET variables from URL in ASPX
本文介绍了从 ASPX 中的 URL 检索 GET 变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
检索传递到 .aspx (VB) 页面的 GET(在 URL 中)变量的最简单/标准方法是什么?
What's the easiest / standard way to retrieve the GET (in URL) variables passed to a .aspx (VB) page?
推荐答案
您可以使用以下内容:
示例网址:http://www.whatever.com?hello=goodbye&再见=你好
string value = Request.QueryString("hello");
价值将是再见
或
foreach(string key in Request.QueryString)
{
Response.write(Request.QueryString(key))
}
这篇关于从 ASPX 中的 URL 检索 GET 变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文