473,811 Members | 1,881 Online
Bytes | Software Development & Data Engineering Community
+ 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 1783
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******** ******@TK2MSFTN GP12.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************* *@exisconsultin g.com

"Anil" <an******@yahoo .com> wrote in message
news:Oa******** ******@TK2MSFTN GP12.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
7135
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 a user from information you got from the session. Each secure app on a site must challenge the user for name and password, each and every time the user accesses it (not just once and then store it in the session). If a secure app is multi-page,...
0
1854
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 goal? Mark Bauhaus, VP, Java Web Services, and Rich Sharples, Senior Product Manager for Application Server, explore this possibility as they examine examples of high availability and introduce Sun's approach
9
2838
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 users to setup permissions for their respective calendars, i just want to be able to see if they're busy or not. Many thanks Dan Williams.
4
3267
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 20045.jpg But for certain items, we don't have image. So, is it possible to check the image is available or no on the server. So, if the image is not available for certain item, then we want to display a default image for that item.
2
2598
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 = document.getElementsByTagName("img"); for(var i=0; i<thumbnail.length; i++) { if(thumbnail.className=="thumbnail_img") {
6
3685
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 should read the same XML file from a backup server. Does anyone have any idea how to achive that?? Any help is appreciated.
5
4338
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 button click. Does any one have a code to check domain name availiability ? it should check basically all. i.e .com, .net, .edu, .com.au, .net.au, ..edu.au, .com.uk, .net.uk, etc...................
3
5908
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
1336
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 to amend the code. You need to seperate the problem of how to position the overlay with how to integrate it in greybox.
0
9728
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10389
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10135
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9205
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7670
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4339
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 we have to send another system
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3018
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.