title: System.Net.HttpUtility.HtmlEncode not encoding #
body: <p>I need to encode a url in my WP7 application. The class im using dosent seem to encode <code>#</code> (to <code>%23</code>). Any ideas what im doing wrong?</p>
  
  <pre><code>string foo = InkBunnyUrls.Login + "&amp;username=" + txtUsername.Text + "&amp;password=" + txtPassword.Password;
  //foo = https://inkbunny.net/api_login.php?output_mode=xml&amp;username=test&amp;password=foobar#1
  string url = System.Net.HttpUtility.HtmlEncode(foo);
  // url = https://inkbunny.net/api_login.php?output_mode=xml&amp;amp;username=test&amp;amp;password=foobar#1
  </code></pre>
  
  <p><strong>Edit</strong>: I tried UrlEncode and that dosent work (see below). Reading the msdn doc it wont escape # . I  cant use the system.web class as it isnt in WP7</p>
  
  <pre><code>        string foo = InkBunnyUrls.Login + "&amp;username=" + txtUsername.Text + "&amp;password=" + txtPassword.Password;
          //foo = https://inkbunny.net/api_login.php?output_mode=xml&amp;username=test&amp;password=foobar#1
          string url = Uri.EscapeUriString(foo);
          //  https://inkbunny.net/api_login.php?output_mode=xml&amp;username=test&amp;password=foobar#1
  </code></pre>