CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Dynamically change image in the imagelink on grid

Print topic Send  topic

Author Message
stanchat

Posts: 7
Posted: 04/19/2005, 10:56 AM

Is there a way to dynamically change the image that is displayed on a grid using the imagelink.

Currently my imagelink is databound to a field in the table called imagename. If this field has a value all is good and the image is displayed. However if this field is NULL only the red X is displayed. I would like to have it work so that I check to see if the value is NULL if it is, then I would like to display a my NO_IMAGE_AVAILABLE.jpg instead.
View profile  Send private message
DonB
Posted: 04/19/2005, 1:15 PM

I'd implement the query with an ifNull() function to substitute the
appropriate image for any NULL values.

Other than that, you can change the Value of the ImageLink in its Before
Show event so that it's the alternate image when a NULL is found.

If you turn on the Enhanced HTML for the ImageLink, then you can even set
its Visible property to false and not display it at all.
--
DonB

http://www.gotodon.com/ccbth


"stanchat" <stanchat@forum.codecharge> wrote in message
news:64265465aa603f@news.codecharge.com...
> Is there a way to dynamically change the image that is displayed on a grid
using
> the imagelink.
>
> Currently my imagelink is databound to a field in the table called
imagename.
> If this field has a value all is good and the image is displayed. However
if
> this field is NULL only the red X is displayed. I would like to
have
> it work so that I check to see if the value is NULL if it is, then
I
> would like to display a my NO_IMAGE_AVAILABLE.jpg instead.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

stan
Posted: 04/19/2005, 5:59 PM

Thanks it works now. This is the code I used
if (Products.ImageLocation.value ="") then  
	Products.ImageLocation.value = "../images/no_image.jpg"  
end if

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.