c# - How to add query string to httpwebrequest -


i want add querystrings httpwebrequest, cannot find property? remembered there querystring dictionary can use before.

the best way add query string follows:

var targeturi = new uri("http://www.example.org?querystring=a&b=c"); var webrequest = (httpwebrequest)webrequest.create(targeturi);  var webrequestresponse = webrequest.getresponse(); 

remember: if you're using user input construct uri, ensure validate it, escape , don't trust it.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -