Changing Pictures On Page

B

brian

I am new to .net technology. I have a home page built
for my company using asp.net. On the bottom of the home
page I want to embed a "dilbert comic strip" which is gif
format. I have the strips in the directory
c:/dilbert/"then by year for sub directories". I would
like to have the page change the picture randomly like
every 3 hours or so. Can this be done and if so how or
where could I find some good documentation on the proper
procedure or class to use.

Thanks in advance.
 
D

Dino Chiesa [MSFT]

There is an AdRotator control, but it changes with every page, not every
three hours.

here's the reference info:
http://msdn.microsoft.com/library/en-us/vbcon/html/vbconAdRotatorWebControl.asp

here's a working sample from the quickstart
http://samples.gotdotnet.com/quicks...orms/ctrlref/webctrl/adrotator/doc_adrot.aspx


You could build your own "user control" based on the image control. When
the page loads, your user control can check the time of day and then select
a gif based on that.

image control example:
http://samples.gotdotnet.com/quicks...webforms/ctrlref/webctrl/image/doc_image.aspx

-Dino
 
J

Jurjen de Groot

Brian,

One way of accomplishing this is :

Use 'CurrentDilbert.gif' on your page, then schedule a simple app to
randomly copy a file from c:/dilbert to CurrentDilbert.gif

Hope this helps.

Jurjen de Groot
G.I.T.S., Netherlands
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top