public class ImageHandler : IHttpHandler { public void ProcessRequest(HttpContext context) { int id =1; Byte[] _image=QueryImage(id); context.Response.ContentType = image/jpeg; context.Response.BinaryWrite(_image); } } void loadImage() { imageControl1.ImageUrl="~/ImageHandler.ashx"; } ********* in place of this how do i do it with ********* void loadImage() { int id=1; using (var binaryWriter = new BinaryWriter(QueryImage(id)) { variable X; binaryWriter(X); imageControl1.ImageUrl=X; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)