C# - Loading remote image and sending to browser using .ashx file
<p>I'm trying to load a remote image from my Amazon S3 bucket and send it to browser in binary. I'm also trying to learn ASP.Net at the same time. I've been a classic programmer for many years and need to change. I started yesterday and have my first headache today.</p>

<p>On a page in my application I have this image element:</p>

<pre><code>&lt;img src="loadImage.ashx?p=rqrewrwr"&gt;
</code></pre>

<p>and on loadImage.ashx, I have this exact code:</p>

<pre><code>-------------------------------------------------
&lt;%@ WebHandler Language="C#" Class="Handler" %&gt;

string url = "https://............10000.JPG";
byte[] imageData;
using (WebClient client = new WebClient()) {
   imageData = client.DownloadData(url);
}

public void ProcessRequest(HttpContext context)
{
    context.Response.OutputStream.Write(imageData, 0, imageData.Length);
}
-------------------------------------------------
</code></pre>

<p>There is probably quite a lot wrong with this, as it's my first attempt at .net and don't know what I'm doing. To start with, I'm getting the following error but sure there's more to come.</p>

<pre><code>CS0116: A namespace does not directly contain members such as fields or methods
</code></pre>

<p>This is on line 3, which is <code>string url = "https://............"</code></p>
