protected void Page_Load(object sender, EventArgs e) { if (string.IsNullOrEmpty(Url)) { throw new ArgumentNullException("Url is NUll !"); } CreateWebImg cwi = new CreateWebImg(Url, 0); MyResetEvent set = new MyResetEvent(); cwi.Start(set.setEvent); set.setEvent.WaitOne(); MemoryStream stream = cwi.ImageStream; if (stream != null) { using (stream) { byte[] buff = stream.ToArray(); Response.ContentType = "image/Jpeg"; Response.BinaryWrite(buff); } } Response.End(); }