M
mc
Scenario:
I have a database of companys, and a directory of images, each image has
the name of one of the companys, although not all companys have images.
I want a page which displays the details for each of the companys, so
far I'm using a repeater with labels for each of the address lines,
phone numbers, etc.
Problem:
I currently set the visibility of the entries from the database with the
following code: -
Visible='<%$!( (Eval("CompanyName") == System.DBNull.Value ) || (
((string)Eval("CompanyName")).Length == 0 ) %>'
Would there be a neater way of hiding the labels?
My main question though is is there a neat way to do the same for an
image, but instead of testing the DB, checking the file system for the
presence of a file?
I have a database of companys, and a directory of images, each image has
the name of one of the companys, although not all companys have images.
I want a page which displays the details for each of the companys, so
far I'm using a repeater with labels for each of the address lines,
phone numbers, etc.
Problem:
I currently set the visibility of the entries from the database with the
following code: -
Visible='<%$!( (Eval("CompanyName") == System.DBNull.Value ) || (
((string)Eval("CompanyName")).Length == 0 ) %>'
Would there be a neater way of hiding the labels?
My main question though is is there a neat way to do the same for an
image, but instead of testing the DB, checking the file system for the
presence of a file?