title: Encoding an Underscore to %5F
body: <p>I am trying to use the HttpUtility.HtmlEncode to encode an underscore to %5f, but the encoded value does not give me the hex representation. How will I accomplish this?</p>
  
  <pre><code>string encodedValue = HttpUtility.HtmlEncode("First_Name");
  </code></pre>
  
  <p>The value I want in the encodedValue string is "First%5FName".</p>
  
  <p>Is there something I am missing? I have also tried using the HttpUtility.UrlEncode, but that does not give me the desired result as well.</p>
  
  <p>I know this should be something simple, but I cant get around it.</p>