title: How can I use the HtmlEncode (or HtmlDecode) function in Visual Studio (vb.net)?
body: <p>I'm making an application that involves logging into a server, however, the post data needs some encoding.</p>
  
  <pre><code>Dim strEncUsername As String = Server.HtmlEncode(Me.txtUsername.Text)
  </code></pre>
  
  <p>However, since this isn't an asp.net application, this doesn't work. How the hay am I supposed to do this? I tried looking for an Imports thing, but no real luck.</p>