ASP.NET image overlay

Posted on 2007-10-02
Last Modified: 2013-11-26
I have an aspx page that populates images from a datasource url.

The same datasource has a field that =1 if sold and =0 if avaiable.

Is it possible to place an "overlay" on the image if the item is sold?

The original's are all jpg's and the overlay is an image of the same sive but is a alpha transparency gif.
Question by:lrbrister
    LVL 29

    Expert Comment

    could you not use 2 separate images and choose which one to use on each row based on the value of the sold/available field?
    Maybe a case statement in your sql select?

    Or perhaps a div containing the transparent gif that is positioned over the original image with the div set to hidden or default based on the sold/availble field?
    LVL 26

    Expert Comment

    You can place the image within the cell of a table and then change the background of the cell to the iamge that you want to show .. add a image tag within the td and set the src to the gif file - sold or available ..
    LVL 26

    Accepted Solution

    a better option would be to use the style property of the image tag .. like this
    <img style="background:url(YourImage.jpg)" src="Sold.gif" alt="" />

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now