Reputation: 73
I have an ASPX page used to pull an image from the database and write the bytes. I have used this method in the past and it has worked just fine. The basic rendering code is as follows:
GetBannerImage.aspx.cs
Response.Clear();
Response.ContentType = "image/png";
Response.AddHeader("Content-Length", Convert.ToString(banner.Image.Length));
Response.BinaryWrite(banner.Image);
Response.End();
On another page, Default.aspx, I spit out some HTML to an ASP literal, as follows:
this.ltlImage.Text = "<img src='" + VirtualPathUtility.ToAbsolute("~/GetBannerImage.aspx?banner_id=" + banner.Id) + "' />";
I have a break point in the Page_Load event of my GetBannerImage.aspx page.
When I view the page source (in Firefox) of Default.aspx, I can click on the src attribute of the image which links to my GetBannerImage.aspx page, hits the breakpoint, and spits out the image. However, there is no image rendered to the screen on the Default.aspx page, and the break point isn't being hit when Default.aspx loads.
In IE and Chrome I am not having this issue - the image loads fine. I am confident that this is not an issue with my rendering code, and I am positive that the src tag is valid. I do not recall updating Firefox recently, but it appears that this is a new issue. Anyone have any suggestions?
Upvotes: 4
Views: 399
Reputation: 861
You can try to disable all your FireFox extensions. Maybe something in there is blocking the image.
Upvotes: 2
Reputation: 73
As @Xm7x suggested, I tried toggling some of my extensions on and off and found out that Ad-Block Plus was preventing the image from rendering. Disabling the extension seemed to allow the image to render fine.
Upvotes: 2