ashx - 获取 QueryString 的所有可能项
ashx - get all the possible items of QueryString
看着这个
http://www.dotnetperls.com/ashx
我可能有这样的代码:
string file = context.Request.QueryString["file"];
if (file == "logo")
{
r.WriteFile("Logo1.png");
}
else
{
r.WriteFile("Flower1.png");
}
这应该允许我根据在浏览器中输入的 URL 看到不同的内容,例如:
http://www.dotnetperls.com/?file=logo
http://www.dotnetperls.com/?file=sth_else_eg_flower
我现在面临的问题是,如何只知道 http://www.dotnetperls.com/?file
我可以读取 file
变量的所有假定选项是什么?在这种情况下,它将是 "logo" 和其他任何内容。
我现实中的是http://www.somewebstie.com/somefile.ashx?somevariable=
。我可以 Google 增加字符串以获得很少的结果(即 http://www.somewebstie.com/somefile.ashx?somevariable=abcde
或 http://www.somewebstie.com/somefile.ashx?somevariable=xyz
)因此我知道它存在并且可以以某种方式搜索。我只想知道所有其他 "abcde" 和 "xyz"。如果我只尝试 http://www.somewebstie.com/somefile.ashx
,我会收到一条单行错误,说我提供了一个错误的变量,而且我在网站的源代码中看不到任何重要的内容。
这里可能重要的是 - 我对网络技术的了解为零。
您无法获取此信息。它都隐藏在代码实现中。没有发布的格式(默认情况下)可以向您显示代码正在寻找的所有可用选项。
看着这个 http://www.dotnetperls.com/ashx
我可能有这样的代码:
string file = context.Request.QueryString["file"];
if (file == "logo")
{
r.WriteFile("Logo1.png");
}
else
{
r.WriteFile("Flower1.png");
}
这应该允许我根据在浏览器中输入的 URL 看到不同的内容,例如:
http://www.dotnetperls.com/?file=logo
http://www.dotnetperls.com/?file=sth_else_eg_flower
我现在面临的问题是,如何只知道 http://www.dotnetperls.com/?file
我可以读取 file
变量的所有假定选项是什么?在这种情况下,它将是 "logo" 和其他任何内容。
我现实中的是http://www.somewebstie.com/somefile.ashx?somevariable=
。我可以 Google 增加字符串以获得很少的结果(即 http://www.somewebstie.com/somefile.ashx?somevariable=abcde
或 http://www.somewebstie.com/somefile.ashx?somevariable=xyz
)因此我知道它存在并且可以以某种方式搜索。我只想知道所有其他 "abcde" 和 "xyz"。如果我只尝试 http://www.somewebstie.com/somefile.ashx
,我会收到一条单行错误,说我提供了一个错误的变量,而且我在网站的源代码中看不到任何重要的内容。
这里可能重要的是 - 我对网络技术的了解为零。
您无法获取此信息。它都隐藏在代码实现中。没有发布的格式(默认情况下)可以向您显示代码正在寻找的所有可用选项。