title: How to handle comma in url in c#
body: <p>My url string is </p>
  
  <p>"<a href="https://MyCom.Produect.App.ResourcePath/ts?Customer_Account=A" rel="nofollow">https://MyCom.Produect.App.ResourcePath/ts?Customer_Account=A</a> B C\, LLC,D E F\, LLC&amp;Billing_Code=11,12&amp;fromDateTime=2013-05-13&amp;toDateTime=2013-06-13"</p>
  
  <p>If I copy it in IE and run, it will return some data. 
  However the same string in c# gives me a bad request exception. 
  Here is my c# code for this,  I think I must miss something. Thanks </p>
  
  <pre><code>    public void GetDataAsyn(string m_strUrl)
      {
          var username = m_strEmail;
          var password = m_strPassword;
  
          var uri = new Uri(m_strUrl);            
  
          var credentialCache = new CredentialCache();
          credentialCache.Add(uri, "Basic", new NetworkCredential(username, password));
          var httpRequest = (HttpWebRequest)WebRequest.Create(uri);
          httpRequest.Method = "GET";
          httpRequest.ContentType = "application/json";
          httpRequest.UseDefaultCredentials = true;
          httpRequest.Accept = Constants.CONTENT_TYPE_TEXT_CSV;
          httpRequest.UserAgent = Helper.GetUserAgent();
          Helper.SetProxyIfNeeded(httpRequest, uri);
          httpRequest.Headers.Add("Authorization", Helper.GetAuthHeader(username, password));
  
          ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
          httpRequest.BeginGetResponse(GetResponseCallback, new object[] { httpRequest });
      }
  
      private void GetResponseCallback(IAsyncResult asyncResult)
      {
          try
          {
              var obj = (object[])asyncResult.AsyncState;
              var request = (HttpWebRequest)obj[0];
              var response = request.EndGetResponse(asyncResult);
              Stream responseStream = response.GetResponseStream();
              if (responseStream != null)
              {
                  var streamReader = new StreamReader(responseStream);
                  ReturnedData = streamReader.ReadToEnd();
              }
  
              ....do something with ReturnedData
          }
          catch (Exception ex)
          {
              Helper.LogError(ex);
          }
      }
  </code></pre>