473,404 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

detect missing images

I have an aspx page that returns a list of products in a datagrid. The
datagrid contains a template which contains a link to an image. The
image name is stored in the database. The actual images are stored in
a folder on the server.

I am looking for a way to create a variation of this page that ONLY
shows the items that are missing images.

Any ideas are greatly appreciated.

Thanks!

Jul 25 '07 #1
3 1348
You could use System.IO.File.Exists to check for file existance. Else what
is the exact problem ?

--
Patrice

"five40" <ad***@rollerwarehouse.coma écrit dans le message de news:
11**********************@e9g2000prf.googlegroups.c om...
>I have an aspx page that returns a list of products in a datagrid. The
datagrid contains a template which contains a link to an image. The
image name is stored in the database. The actual images are stored in
a folder on the server.

I am looking for a way to create a variation of this page that ONLY
shows the items that are missing images.

Any ideas are greatly appreciated.

Thanks!

Jul 26 '07 #2
I'm not sure how to integrate that into the code with the datagrid.
The name of the image is stored in the database and I access it
through a template column with like this:

<asp:Label ID="lblImagePath" runat="server" Visible="false" Text='<%#
DataBinder.Eval(Container.DataItem, "ProductImage") %>'</asp:Label>

How do I incorporate "System.IO.File.Exists" into the datagrid? And
how do I make the visibility of the rows dependent on the outcome?

I am new at this and learning so thanks for your patience.
On Jul 26, 12:39 am, "Patrice" <http://www.chez.com/scribe/wrote:
You could use System.IO.File.Exists to check for file existance. Else what
is the exact problem ?


Jul 26 '07 #3
My approach would be just to suppress unwanted lines from the data source
(either by removing uneeded lines or by filtering on a boolean columns that
tells if the image is there).

This column could be added and filled just before rendering the grid but a
later time it could be even something that is stored in your db (I assume
that you know earlier that there is no image, for example because no image
was uploaded in the product creation form ?)

--
Patrice

"five40" <ad***@rollerwarehouse.coma écrit dans le message de news:
11**********************@k79g2000hse.googlegroups. com...
I'm not sure how to integrate that into the code with the datagrid.
The name of the image is stored in the database and I access it
through a template column with like this:

<asp:Label ID="lblImagePath" runat="server" Visible="false" Text='<%#
DataBinder.Eval(Container.DataItem, "ProductImage") %>'</asp:Label>

How do I incorporate "System.IO.File.Exists" into the datagrid? And
how do I make the visibility of the rows dependent on the outcome?

I am new at this and learning so thanks for your patience.
On Jul 26, 12:39 am, "Patrice" <http://www.chez.com/scribe/wrote:
>You could use System.IO.File.Exists to check for file existance. Else
what
is the exact problem ?



Jul 27 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Phil Powell | last post by:
How do you detect an image MIME type if you know of the image in a directory? For example, I know of: if (is_file("$myImagePath/$myImageName")) { // FIND MIME TYPE BUT HOW I DUNNO } The...
6
by: Ed | last post by:
I first noticed this in my own app. Images would show up missing randomly on IE 6.0.2800.1106 on Windows 2000 server. I then was able to repro this problem on Microsoft's website!!! The page I...
157
by: Dennis | last post by:
Is there some way --using, say, DOM or javascript-- to detect the current pixel width and/or height of a relatively sized table or of one of its columns or rows. I'm going to be writing javascript...
2
by: Jake | last post by:
Hi, I have a page with a bunch of thumbnails that when clicked, open the full size image in a new window. They are all different sizes and its a bit unprofessional looking. I'd like to find a...
12
by: Mark Anderson | last post by:
Even with preloading roll-overs etc, the first set of images used on screen still have to load before they can be seen. So, I've been asked I can to show a text message 'loading...' while a number...
1
by: Dennis Myrén | last post by:
Hi. I have already posted this question once, but this repost is to ensure no gurus missed it, who might be able to help me out here; I would like to know whether it is possible - without...
0
by: tsjwang | last post by:
I have a Windows XP system with a USB hub attached to it. The hub has a USB cdrom and a few USB storage devices plugged in. Occasionally the cdrom and/or the storage devices disappeared or failed to...
10
by: Benny | last post by:
I am wondering if anyone has a simple approach to detecting the location of boxes and/or lines on an image. For example, if I have an image of a form, and want to find out where all of the boxes...
8
by: kroogar | last post by:
Hi gurus .Net 2.0 I'm on a project where I need to be able to detect if my clipboard contains BOTH images AND text (eg. when copying from a web page). For some reason...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.