473,405 Members | 2,334 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,405 software developers and data experts.

How to change a web page's background image according to time

bansari
20
hi..i am asked to change the homepage's background image on each hour.i am using c#.and visual studio 2008.
Is it possible with timer control?if yes then how?
And is there any other way? kindly help.plz.thanks in Advance!
Sep 29 '10 #1
3 1719
Frinavale
9,735 Expert Mod 8TB
You could use a timer control to postback to the server ever hour if you wanted to.

But you're going to have to have to implement something server-side that is responsible for getting the next image every hour.

So, use an application wide variable to store the DateTime of the last time that the image was changed...if it has been more than an hour, implement that sets the URL to the "next image".

-Frinny
Sep 29 '10 #2
bansari
20
Can you help with some code? means as i m novise.i dnt know how i would change Url to next image ?
Sep 30 '10 #3
Frinavale
9,735 Expert Mod 8TB
How are you currently setting the image url?

-Frinny
Sep 30 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Markus Mohr | last post by:
Hi, everyone, I have a special problem: For every monitor resolution in 200 pixel steps from 800 to 1600 pixels I have an image to be shown as centered background-image. Those images all...
4
by: Dj Frenzy | last post by:
Hi, I know how to use javascript to change a background image to another background image, and how to change a background colour to another background colour. Is there a way to change an image to a...
2
by: ron | last post by:
Hi, I have a page where i would like like to change the background image depending on the 'Request.Params' received value in the code behind. There are three different image that can be loaded....
2
by: EMW | last post by:
For my page I have created two backgrounds. On startup is uses image1 and when the user clicks on a linkbutton it should use image2. Here is were problem is. I cannot find how to do this. I can...
1
by: cinergy | last post by:
Can someone provide a sample of how to display a different background image in a table cell each time the page loads? I am only able to find scripts to display a different picture outside a table...
4
by: vunet.us | last post by:
Hi, I found a bug in IE6, though it is known already. If I have a CSS background property set to some image, such as background:url(myimg.gif);, and I apply this property to some html element,...
2
by: Jim | last post by:
How can I use JavaScript to change a background image in a table cell? Here's the code for the cell <td width="338" valign="top" background="../images/ LEC_Q1.jpg"><div...
9
by: ghjk | last post by:
change the background image when Button Click ====================================== I' developing site with php and postgres. It has menus list in the left side. and all are images(jpg) EX:Add...
1
by: Swapnil Suryawanshi | last post by:
how to change the background image at run time?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
0
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
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,...

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.