473,480 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to check the image availability on server

Hi All,

we have hundreds of images on our server. They are shown on the webpage with
the unique id.
So, if the image is available then we want to show the image. If not
available then, we want to display a default image.

Please let me know how to do it. And if someone has got code, please send
it.

Thanks,
Anil
Nov 15 '05 #1
2 1762
Presumably you are storing the path to the file somewhere. If you want to
just check for the existence of a file, then you can use the File.Exists
method.

"Anil" <an******@yahoo.com> wrote in message
news:Oa**************@TK2MSFTNGP12.phx.gbl...
Hi All,

we have hundreds of images on our server. They are shown on the webpage with the unique id.
So, if the image is available then we want to show the image. If not
available then, we want to display a default image.

Please let me know how to do it. And if someone has got code, please send
it.

Thanks,
Anil

Nov 15 '05 #2
Anil,

I would route the image request through an ASPX page. Basically, add
the filename to the querystring. Then, in the page, check to see if the
file exists. If it does, then redirect to the image. Otherwise, redirect
to the default image.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Anil" <an******@yahoo.com> wrote in message
news:Oa**************@TK2MSFTNGP12.phx.gbl...
Hi All,

we have hundreds of images on our server. They are shown on the webpage with the unique id.
So, if the image is available then we want to show the image. If not
available then, we want to display a default image.

Please let me know how to do it. And if someone has got code, please send
it.

Thanks,
Anil

Nov 15 '05 #3

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

Similar topics

27
7083
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
0
1837
by: Joan MacEachern | last post by:
Date: Thursday, October 2, 2003 Time: 10-11am PT/ 1-2pm ET Some business applications define mission critical. You just can't afford to have them go down. Ever. Is 'always on' a realistic...
9
2813
by: Dan Williams | last post by:
Can anyone tell me how to go about creating my own custom ASP page that can show several different peoples availability from their Outlook/Exchange 2000 calendars? I don't want to have to ask...
4
3236
by: Anil | last post by:
Hi All, We have hundreds of images on our server. Depending on the ItemID (fetched from database) we display the image to the client. For ex. if the ItemID is 20045 then, we display the image...
2
2571
by: emma.sax | last post by:
My script is as follows: function setImageSizes() { var staticHeight = 70; if(!document.getElementsByTagName || !document.images) return false; var thumbnail =...
6
3651
by: test2000 | last post by:
Hello I'm trying to write a javascript that checks if a server/host is available. To be more precice. I would like to check if the browser can read an XML file from a server. If not the script...
5
4288
by: Puja | last post by:
Hi all, I need to check domain name availibility on one of my page in website. I do not want to let user click a link which leads to sites which check for domain name but I want check on my...
3
5892
by: nRk | last post by:
Hi, Is there any way to check the availability of a web service without including any extra web method? Thank & regards nRk
1
1319
by: C. (http://symcbean.blogspot.com/) | last post by:
On Aug 12, 7:08 am, long_way <yilongwei....@gmail.comwrote: Hi, Wouldn't it just be simpler to use Google maps? I'm not overly familiar with greybox, but it should be fairly straightforward...
0
7048
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
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6743
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
6966
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2999
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.