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-
|
|
|
 |
|