title: Why is System.Web.HttpUtility.UrlEncode giving namespace name doesn't exist in Visual C# 2008?
body: <p>I'm trying to encode a URL using the <code>HttpUtility.UrlEncode()</code> method, why am I getting </p>
  
  <blockquote>
    <p>The type or namespace name 'HttpUtility' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)</p>
  </blockquote>
  
  <p>error ?
  I'm using Visual C# 2008, Express Edition.</p>
  
  <p>The code I'm using is simplistic:</p>
  
  <pre><code>using System;
  using System.Text;
  using System.Windows.Forms;
  using System.Net;
  using System.IO;
  using System.Web;
  namespace Lincr
  {
      public partial class frmMain : Form
      {
          public frmMain()
          {
              InitializeComponent();
          }
  
          private void cmdShorten_Click(object sender, EventArgs e)
          {
              WebRequest wrURL;
              Stream objStream;
              wrURL = WebRequest.Create("http://lin.cr?l=" + System.Web.HttpUtility.UrlEncode(txtURL.Text) + "&amp;mode=api&amp;full=1");
              objStream = wrURL.GetResponse().GetResponseStream();
              StreamReader objSReader = new StreamReader(objStream);
              textBox1.Text = objSReader.ReadToEnd().ToString();
  
          }
  
      }
  }
  </code></pre>