here is my DB:

ImageHandler.ashx
public class ImageHandler : IHttpHandler {
ImageDataDataContext image = new ImageDataDataContext();
public void ProcessRequest (HttpContext context) {
string imageid = context.Request.QueryString["ImID"];
var ketqua = (from img in image.tblImgs
where img.imgID == int.Parse(imageid)
select new
{
img.imgData
}).First();
context.Response.BinaryWrite((byte[])ketqua); //Cannot convert type 'AnonymousType#1' to 'byte[]' context.Response.End();
}
public bool IsReusable {
get {
return false;
}
}
}
Can you pls help me how to correct the error. thanks :)
nothing elsePosted Mar 4, 2013, 3:46 AM
thank you so much...It's work now :)
VulpesPosted Mar 3, 2013, 5:44 AM
nothing elsePosted Mar 2, 2013, 9:05 PM
@vulpes.. thank for replying, but it's says:
'System.Data.Linq.Binary' does not contain a definition for 'Save' and no extension method 'Save' accepting a first argument of type 'System.Data.Linq.Binary' could be found (are you missing a using directive or an assembly reference?)
VulpesPosted Mar 2, 2013, 1:32 PM
brunda kPosted Mar 2, 2013, 12:37 PM