473,748 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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:templateCo lumn>
<itemtemplate >
<asp:HyperLin k id="HyperLink1 " runat="server" Target="_blank"
NavigateUrl='<% # SetDisLink(Data Binder.Eval(Con tainer, "DataItem.U RL")
) %>'>
<img src='<%# iif((DataBinder .Eval(Container ,"DataItem.URL" ) >"
"),"Info.gif"," NoInfo.gif") %>' />
</asp:HyperLink>
</itemtemplate>
</asp:templateCol umn>

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

Can someone please help me.
Nov 18 '05 #1
3 1587
On 7 Aug 2004 18:20:32 -0700, Rob Rogers <ro*@natltc.com > wrote:
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:templateCo lumn>
<itemtemplate >
<asp:HyperLin k id="HyperLink1 " runat="server" Target="_blank"
NavigateUrl='<% # SetDisLink(Data Binder.Eval(Con tainer, "DataItem.U RL")
) %>'>
<img src='<%# iif((DataBinder .Eval(Container ,"DataItem.URL" ) >"
"),"Info.gif"," NoInfo.gif") %>' />
</asp:HyperLink>
</itemtemplate>
</asp:templateCol umn>

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...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #2
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....

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
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.
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
20650
by: Dan V. | last post by:
I have tried a number of things including preloading, but the background image (water tile in header) in IE 6 will not display where other browsers will. http://www.officeactivate.com/web-site-design.shtml Any ideas? thanks.
3
2547
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called "Resource" with the following structure : Resource{,en,fr,es} Yes.. these are the only languages supported actually. A couple of rows in that table would look like this :
2
3401
by: Bei | last post by:
I have a page which has to change 1 image inside periodically. However, I don't have to modify the page to change. I just replace the old image file with a new one with the same name. Then there is a problem of that (images with same name). Everytime there is a new image, the page still show the old image. Even refreshing the page doesn't refresh that image. It's because the image name is the same and browser just load it from the cache...
4
1449
by: nicholas | last post by:
How can I show or hide an image in a datagrid depending on a field. Something like: if myfield <> "" then 'show image' else 'show noimage.gif' end if the image field contains the image name so: 'show image' could be something like <img source="/myfolder<%# databinder.eval(....) %>" ..... > THX
4
2694
by: Jake | last post by:
Does cookieless session state (with the sessionid embedded into the url) interfere with the browser's retrieval of cached images from one session to the next? Does the sessionid embedded into the url effectively limit client-side image caching to the lifetime of the session? Thanks Jake
2
2856
by: Tim::.. | last post by:
Hi I'm trying to create a little application that shows an image of a user when you mouseover there details in a datagrid. The datagrid is populated from an Active Directory Database and I presume the best way to create the popup is by using a layer with javascript hide and show... I intend to use a database to store the pictures in and the use the users full name to build a relationship between the database with the images and the...
3
2069
by: Øyvind Isaksen | last post by:
I have a datagrid that displays all files in a folder. It works good, but I need a extra column with a link for choosing image. As shown in the code below I have made an ItemTemplate for this, and what I need to do is to put the filename in the CommandArgument. How do I do that?? Is this the right way to do it, or is it a smarter way to put the filename in a session-variable when clicking on the "Use this image"-LinkButton ? ...
6
1323
by: Tim Streater | last post by:
The statement: myImage.src = "wiggy.jpg"; appears to be a no-operation in FireFox 2.0.0.14 under XP. Works fine in IE7 (XP) and on the Mac under Safari and FF. myImage points to an <img ...and wiggy.jpg is in the same directory as the HTML file (a network mount, from which all these browsers were accessing it).
1
2193
by: kout | last post by:
Hello. I'm trying to make some kind of image gallery with php and javascript (w/ ajax), but I've run into some problems. The basic idea is the following: I've got a <span> tag and, when I click a button, the inner html of the tag changes to <img src="x" />. The problem is that, unless the image is small -less than 80kB-, it won't load properly. Some browsers won't display it entirely, some others won't even show it. The code related to it:...
0
8995
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9561
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8252
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.