Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# aspx return image

public class ImageHandler : IHttpHandler 
{ 
  public bool IsReusable { get { return true; } } 

  public void ProcessRequest(HttpContext ctx) 
  { 
    var myImage = GetImageSomeHow();
    ctx.Response.ContentType = "image/png"; 
    ctx.Response.OutputStream.Write(myImage); 
  } 
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #aspx #return #image
ADD COMMENT
Topic
Name
4+5 =