asp.net datagrid image won't show after publish to internet

R

Rob Rogers

I have an ASP.NET datagrid that contains an image. The image can be
one of two images, either "INFO.GIF" or "NOINFO.GIF". The datagrid
looks fine when I test it from my local machine in visual studio.net,
but when I publish it to the net, the "INFO.GIF" image doesn't show
up.
I am pulling my hair out on this one. Here is the code from my aspx
file.

<asp:templateColumn>
<itemtemplate>
<asp:HyperLink id="HyperLink1" runat="server" Target="_blank"
NavigateUrl='<%# SetDisLink(DataBinder.Eval(Container, "DataItem.URL")
) %>'>
<img src='<%# iif((DataBinder.Eval(Container,"DataItem.URL") >"
"),"Info.gif","NoInfo.gif") %>' />
</asp:HyperLink>
</itemtemplate>
</asp:templateColumn>

The "SetDisLink" simply returns a url for the "Info" image to link to.

Can someone please help me.
 
C

Craig Deelsnyder

I have an ASP.NET datagrid that contains an image. The image can be
one of two images, either "INFO.GIF" or "NOINFO.GIF". The datagrid
looks fine when I test it from my local machine in visual studio.net,
but when I publish it to the net, the "INFO.GIF" image doesn't show
up.
I am pulling my hair out on this one. Here is the code from my aspx
file.

<asp:templateColumn>
<itemtemplate>
<asp:HyperLink id="HyperLink1" runat="server" Target="_blank"
NavigateUrl='<%# SetDisLink(DataBinder.Eval(Container, "DataItem.URL")
) %>'>
<img src='<%# iif((DataBinder.Eval(Container,"DataItem.URL") >"
"),"Info.gif","NoInfo.gif") %>' />
</asp:HyperLink>
</itemtemplate>
</asp:templateColumn>

The "SetDisLink" simply returns a url for the "Info" image to link to.

Can someone please help me.

So in the HTML source in the browser, you verified it's putting the
correct image in there? I would say your image isn't physically there on
the server or the URL is wrong in the HTML...
 
R

Rob Rogers

The image exists on the server, That was the firt thing I checked and
tested with several different images just to be sure. Any ideas?
Thanks....
 
R

Rob Rogers

I found the answer, The problem was the I was using ZoneAlarm firewall
and it was blocking some gif images from showing up in the datagrid.
Got rid of ZoneAlarm and fixed the problem.
This explained why the images were showing up when I tested
locally and not showing up when I tested remotly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top