473,811 Members | 2,979 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Image Url = myProductDetail s.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.Image Url = "~/Images/No-Image.gif" Then

ImageURL4.Image Url = myProductDetail s.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 1175
Found out how to do this a minute after IO posted...
If myProductDetail s.ProductPrice. ToString = 0 Then

lblProductPrice .Visible = False

End If

Blah blah...

Thanks all,

Paolo

"Paolo Pignatelli" <Pa***@DotNetSt ore.com> wrote in message news:et******** ******@TK2MSFTN GP12.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.Image Url = myProductDetail s.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.Image Url = "~/Images/No-Image.gif" Then

ImageURL4.Image Url = myProductDetail s.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
20945
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 contains the paths to the pictures. The database consists of two tables: TABLE DATA ID Name LastName
2
1340
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 database (where also the tax rates are stored) various places in the code and typically (but now always) the values are returned in DataSets which are bound to controls and displayed to the user. What would be the most elegant way to implement the...
5
5052
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 that calls the web service to render a vertical strip of images. After doing some research I am unable to find some vb.net code that can assist in what I want to achieve. The closest thing I found was
7
5414
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 to show the image, and an image.php page that accesses the database, retrives the image data, and then (theoretically) prints the decoded data to the page. below is the view.php page code: problem area the img tag src no
1
10394
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10127
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9201
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
7665
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
6882
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
5552
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
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4336
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3015
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.