CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Blank Image for ImageLink in ASP

Print topic Send  topic

Author Message
jbruschi
Posted: 11/15/2002, 8:35 AM

Hey:

Can anyone tell me how I can get rid of the blank image box when
there is no image referenced in the database? Is this a BeforeShow event
or is there another way around it? I am using ASP and would like to
see an ASP solve for this..
Thanks in advanced.

Jon
AndrewI
Posted: 11/15/2002, 9:29 AM

You could get round this entirely using SQL probably.

Upload an image - say blank.gif - that is just a transparent pixel or two.


I forget whether the CCS image control has a default property in its data properties. If it has, then you could enter 'blank.gif' here and CCS should use this whenever the database field is blank & that should solve it.

If this doesn't work, you could change the SQL so that it does the same job. Assuming that when the field is has no image name it returns Null (and this would need checking) you could

replace [ImageField] with Nz([ImageField] , "blank.gif")
(assuming an Access database)
or iif(IsNull([ImageField], "blank.gif", [ImageField])
or similar.

But the good thing about CCS is that you don't have to manually write the SQL: set the SourceType property of the image control to Database Expression and type the above statement (or appropriate variation for your databse) into the control source property.
jbruschi
Posted: 11/15/2002, 11:38 AM

Thanks for the info.. I am still having trouble getting the
box with the 'x' in it to be replaced with my blank.gif file.. I think
the issue may be that the images are ImageLinks and not images. They are pulling from a DB and referencing another field in the database. What these images are essentially are thumbnails.

And what I want is, if there is not a thumbnail URL in the DB for this thumbnail I just want it to be blank.. Any other ideas?

Thanks-

   


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.