broken images

broken images

Post by Cath » Tue, 03 Dec 2002 18:22:32


Hi,

I have an Image webcontrol on my aspx. I would like to check first if the
URL of the image is dead. If it's not, I'll display the image. If it is, I
will display it. The question is... how do I check whether the URL is dead
or not?

Thanks,
Cath

 
 
 

broken images

Post by Victor Garcia Aprea [MVP » Mon, 09 Dec 2002 07:24:58


You could use the System.IO.File class to check that the image file already
exists on disk.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.


Quote:> Hi,

> I have an Image webcontrol on my aspx. I would like to check first if the
> URL of the image is dead. If it's not, I'll display the image. If it is, I
> will display it. The question is... how do I check whether the URL is dead
> or not?

> Thanks,
> Cath


 
 
 

broken images

Post by Cath Victo » Mon, 09 Dec 2002 21:16:33


But the image is on another server on another machine... :)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

broken images

Post by Victor Garcia Aprea [MVP » Tue, 10 Dec 2002 09:42:58


No problem, take a look at the HttpWebRquest and HttpWebResponse classes for
that.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.


Quote:

> But the image is on another server on another machine... :)

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

 
 
 

broken images

Post by Cath Victo » Tue, 10 Dec 2002 15:04:34


Actual code please? ;)

Thank you very very much... :D

Cath

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

1. broken image

I am making a query to a db at Page_Load which retrieves all rows. There is
an "image" column which is a varchar that references an image on the
filesystem. Some rows have NULL for the image. In my DataGrid I have an
asp:image control that displays the image:

<asp:Image ID="pimage" ImageUrl='<%# DataBinder.Eval(Container.DataItem,
"image", "/nvp/images/partners/{0}") %>' Runat="server" />

How do I conditionally process this control so that it only attempts to
display the image when the value is not NULL?

Thanks in advance!

2. INSTALL MESSAGE

3. Broken Image In Designer With ~ Path?

4. 'mysqladmin flush-hosts'

5. Image control <-----= varbinary(32) "image" in SQL Server

6. Canon BJC 8200 Clog

7. BinaryWrite and jpeg images from Sql Server image type.

8. HP LJ4000...is it my imagination?

9. Determine if Image is an Image?

10. resize a 8bpp Gray image gives 24bpp image

11. Gathering metadata from images without loading the entire image

12. Can i Apply Image attributes to an Image without actually drawing it on the screen?

13. PictureBox WebForms Image.FromStream image on fly