且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用变量作为URL字符串中的参数时使用WebRequest.Create(URL)时出现问题

更新时间:2021-08-21 04:56:08

您是否已经调查了这些字符串?例如:

string s1 = "http://path/controller/action?id=" + id +"&accountNo=" + accountNo + "&hash=" + hash;
string s2 = "http://path/controller/action?id=2&accountNo=98989898&hash=65bbfbacba7435aed714ea3a4e9fc97ec92509b2c97d5";

bool are_equal = s1 == s2;

 

如果 are_equal 为false,则可能是变量( id
accountNo hash )不包含预期值。使用调试器继续研究。

If are_equal is false, then probably the variables (id, accountNo, hash) do not contain the expected values. Continue your research using the Debugger.