title: Build url string using C#
body: <p>I've been trying to build the request url for my json request but been getting a 404 error. This is the code I put together after reading some threads on it. Can anyone help?</p>
  
  <pre><code>var apiKey = "123456";
  var Query = "some search";
  var Location = "San Jose, CA";
  var Sort = "1";
  var SearchRadius = "100";
  
  var values = HttpUtility.ParseQueryString(string.Empty);
  
  values["k"] = apiKey;
  values["q"] = Query;
  values["l"] = Location;
  values["sort"] = Sort;
  values["radius"] = SearchRadius;
  
  string url = "http://api.website.com/api" + values.toString();
  </code></pre>
  
  <p>This is where I am getting the error. After passing the url on client.DownloadString()</p>
  
  <pre><code>var client = new WebClient();
  var json = client.DownloadString(url);
  var search = Json.Decode(json);
  </code></pre>