title: Why the name 'Request' does not exist when writing in a class.cs file?
body: <p>I would like to move the following piece of code from a c# aspx.cs file into a stand alone class.cs file.</p>
  
  <pre><code>string getIP = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
  if (String.IsNullOrEmpty(getIP)) getIP = Request.ServerVariables["REMOTE_ADDR"];
  </code></pre>
  
  <p>This piece of code used to reside in the page_load of an aspx.cs file worked just fine, but it raises an error in the class file.</p>
  
  <p>The 'Request' needs no 'using' when in a aspx.cs file, and offers none in this context.</p>
  
  <p>How do I solve this problem?</p>