title: opening pdf using ashx (handler) file
body: <p>This is the handler code: If I navigate directly to this handler it shows pdf fine. On Aspx page I have a image control, pdf doesn't show in imagecontrol. Accroding to all google search this is supposed to be shown in image control</p>
  
  <pre><code>public void ProcessRequest(HttpContext context)
      {
  
              WebClient imageWebClient = new WebClient();
              byte[] imageBytes = imageWebClient.DownloadData(Testlocation);
              context.Response.ClearHeaders();
              //context.Response.ClearContent();
              context.Response.AddHeader("content-disposition", "inline; filename=image.pdf");
              context.Response.ContentType = "application/pdf";
              context.Response.AddHeader("Content-Length", imageBytes.Length.ToString());
              context.Response.BinaryWrite(imageBytes);
              context.Response.Flush();
  </code></pre>
  
  <p>}</p>
  
  <p>Markup on Aspx page:</p>
  
  <p></p>