【发布时间】:2015-03-23 07:21:05
【问题描述】:
使用 C#.Net,如果 URL 不存在或者如果存在则更新当前值,我如何将查询字符串参数添加到 URL?
例如——
我有 URL - http://example.com/Test.aspx?foo=bar&id=100,我想将 foo 值更新到图表,还想将新参数添加/附加为 hello = world 和 testStatus = true 到查询字符串。
所以最终的预期输出将是 -
http://example.com/Test.aspx?foo=chart&hello=world&testStatus=true&id=100
【问题讨论】:
-
您的意思是发出 GET 请求?
-
不,我想用查询字符串值形成 URL