473,383 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Conditionally display images from database

I have a database containing an ImageURL3 column, in which the default is
~/Images/No-Image.gif .

I would like to dispaly the images from the column in a webpage,l as long as they are not the No-Image "image" (a one pix gif).

I get the values to displa fine by coding:

ImageURL1.ImageUrl = myProductDetails.ImageURL1

For examploe ,but, how do I tell the ASP Image contrlo not to display when the value is ~/Images/No-Image.gif ?

I tried

If Not ImageURL4.ImageUrl = "~/Images/No-Image.gif" Then

ImageURL4.ImageUrl = myProductDetails.ImageURL4

End If

But still get the No-Image.gif. (I also tried to make it invisible, but no luck).

Thanks for any help,

Paolo

Nov 19 '05 #1
1 1155
Found out how to do this a minute after IO posted...
If myProductDetails.ProductPrice.ToString = 0 Then

lblProductPrice.Visible = False

End If

Blah blah...

Thanks all,

Paolo

"Paolo Pignatelli" <Pa***@DotNetStore.com> wrote in message news:et**************@TK2MSFTNGP12.phx.gbl...
I have a database containing an ImageURL3 column, in which the default is
~/Images/No-Image.gif .

I would like to dispaly the images from the column in a webpage,l as long as they are not the No-Image "image" (a one pix gif).

I get the values to displa fine by coding:

ImageURL1.ImageUrl = myProductDetails.ImageURL1

For examploe ,but, how do I tell the ASP Image contrlo not to display when the value is ~/Images/No-Image.gif ?

I tried

If Not ImageURL4.ImageUrl = "~/Images/No-Image.gif" Then

ImageURL4.ImageUrl = myProductDetails.ImageURL4

End If

But still get the No-Image.gif. (I also tried to make it invisible, but no luck).

Thanks for any help,

Paolo

Nov 19 '05 #2

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

Similar topics

12
by: Wadim Grasza | last post by:
I want to store and display (on a form or a report) multiple pictures per record in an access database. The pictures are not stored within the database. They are stored as files and the database...
2
by: Olav Tollefsen | last post by:
I'm creating an ASP.NET e-commerce web site and I have to conditionally (depending on site / user settings) display prices either excluding or including tax. Prices are typically read from a...
5
by: Peter Lapic | last post by:
I have to create a image web service that when it receives an imageid parameter it will return a gif image from a file that has been stored on the server. The client will be an asp.net web page...
7
by: eholz1 | last post by:
Hello Group, Perhaps you can help me. I have a mysql db, that holds images. Images are encoded using base64_decode/encode, etc. Image data seems fine. I have a view.php page that is supposed...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.