How do I tie in my image handler with an image control? <p>I've been looking around and reading about handlers, but I don't fully understand how to implement them for my situation.</p> <p>I want display a screenshot from the user's clipboard. I already have code that retrieves the image from the clipboard into a bitmap format. This is what I have:</p> <pre><code>var dataobj = new DataObject(); dataobj = (DataObject)Clipboard.GetDataObject(); System.Drawing.Image img = dataobj.GetData(DataFormats.Bitmap) as System.Drawing.Image; original = (System.Drawing.Image)img.Clone(); img = resizeImage(img, new Size(670, 500)); String s = "c:/Temp/temp.png"; img.Save(s, ImageFormat.Png); Image1.ImageUrl = s; Image1.DataBind(); </code></pre> <p>My problem was that I am not able to save the images to the hard disk.</p> <p>My first question is will an image handler help me in this situation?</p> <p>if it will, how do I modify that code and tie it into my image handler with this code:</p> <pre><code>public class getmyimage : IHttpHandler { public void ProcessRequest(HttpContext context) { HttpResponse r = context.Response; r.ContentType = "image/png"; // Write the requested image r.WriteFile("temp.png"); } public bool IsReusable { get { return false; } } } </code></pre>