Compiler error:The type or namespace name 'Core' does not exist in the namespace 'System' (are you missing an assembly reference?)
<p>I try to upload an image in my project which is in c#.and my code in the submit button is following</p>

<pre><code>FileUpload1.SaveAs(
          Server.MapPath("Photos\\" + 
              System.Core.WebSecurity.GetUserName(Request) + ".jpg"));

Response.Write(
    "&lt;html&gt; &lt;script&gt; alert ( 'you have successfully uploaded' ); &lt;/script&gt;&lt;/html&gt;");

Response.Redirect("studentcreated.aspx");
</code></pre>

<p>but on compiling it shows an error as </p>

<blockquote>
  <p>The type or namespace name 'Core' does not exist in the namespace
  'System' (are you missing an assembly reference?)
  .</p>
</blockquote>

<p>Then i try to solve this by adding system.core to reference.But still it shows the same error.I am using vs2008 asp3.5.Please help urgently </p>
