Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having quite a weird issue here. I am dynamically loading images into a page. These images are stored in the database. I have a generic file handler that returns the image, and contains the following code:

C#
GetClientUploadFileDetails_Result img = dataContext.GetClientUploadFileDetails(HttpContext.Current.User.Identity.Name, imageID).First();
                HttpContext.Current.Response.Clear();
                HttpContext.Current.Response.AddHeader("content-disposition", string.Format("inline; filename=\"{0}\"", img.Logo_name));
                HttpContext.Current.Response.ContentType = img.Mimetype;

                if (HttpContext.Current.Response.IsClientConnected)
                    HttpContext.Current.Response.BinaryWrite(img.ImageData);


The images load in Chrome and FF, but do not in IE?? If I inspect the element in IE and click on the src link, it goes to a new page and shows the image? I cannot see why this isnt working?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900