5,117,952 members and growing! (12,435 online)
Email Password   helpLost your password?
Web Development » Ajax and Atlas » Samples     Intermediate License: The Code Project Open License (CPOL)

An ASP.NET Slide Show

By Lang Deng

A simple slide show using AJAX in ASP.NET.
JScript, XML, C#, HTML, Windows, .NET, ASP.NET, Ajax, VS2005, VS, Dev

Posted: 30 Mar 2006
Updated: 30 Mar 2006
Views: 69,962
Announcements



Search    
Advanced Search
Sitemap
21 votes for this Article.
Popularity: 4.29 Rating: 3.24 out of 5
5 votes, 23.8%
1
3 votes, 14.3%
2
1 vote, 4.8%
3
6 votes, 28.6%
4
6 votes, 28.6%
5

Introduction

I had been looking for the source of a web-based slide show for my own use. The features I wanted in my slide show pages were that it should dynamically select a picture in the server to display, it should display some transition effects, and it should not cause page refreshing. But I couldn’t find one of this kind. So I decided to code it myself.

There is a lot of source code to make the transition effect using JavaScript. But to address the dynamic selection of the picture to display and to avoid the page from refreshing, I used AJAX. There are a lot of AJAX frameworks and tools out there to choose from. But for this simple task, I just used the ASP.NET2’s built-in AJAX supported class System.Web.UI.ICallbackEventHandler.

The included source code will demonstrate the use of this class, and also how to use JavaScript to make the request to get the next image file and apply the transition effects. One thing I need to mention is when applying transition effects, the next image has to be completely loaded before playing the effect, otherwise, the picture display will not be smooth and will be flickering. I also address this in my JavaScript code.

In fact, this is a part of my photo album web project. For the live demo of the slide show in my photo album, click here.

Using the code

To use the source, unzip the project files to a folder, load the Slideshow.sln in Visual Studio 2005, and run it.

Hope my post is useful to you. Enjoy!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Lang Deng



Occupation: Web Developer
Location: United States United States

Other popular Ajax and Atlas articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 25 of 49 (Total in Forum: 49) (Refresh)FirstPrevNext
Subject  Author Date 
GeneralRandom to Orderedmemberasewefy0:17 20 Sep '07  
GeneralNo thumbnailsmemberEdwardJr10:06 21 Aug '07  
GeneralRe: No thumbnailsmemberLang Deng10:23 21 Aug '07  
GeneralRe: No thumbnailsmemberEdwardJr11:03 21 Aug '07  
QuestionWeb Photo Albummembersides_dale16:53 28 May '07  
AnswerRe: Web Photo AlbummemberLang Deng14:39 29 May '07  
GeneralMaster Pagememberalexaz110:18 7 May '07  
GeneralRe: Master PagememberLang Deng15:56 7 May '07  
GeneralDoesn't work in Firefoxmembercykophysh391:08 23 Feb '07  
QuestionDose not support mozilla browsermembergurusewack22:13 12 Jan '07  
AnswerRe: Dose not support mozilla browsermembercykophysh3916:07 23 Feb '07  
QuestionAjax slideshowmemberwagstaff17:32 31 Dec '06  
AnswerRe: Ajax slideshowmemberLang Deng9:41 1 Jan '07  
QuestionBanding of image at bottommemberYoojin9:52 8 Dec '06  
Generalusing slideshow 3 times on one pagememberlennied0:50 6 Dec '06  
GeneralRe: using slideshow 3 times on one pagememberLang Deng22:31 6 Dec '06  
GeneralRe: using slideshow 3 times on one pagememberlennied0:52 7 Dec '06  
Generalgetting an error when servers wants to upload next image [modified]memberlennied3:52 5 Dec '06  
QuestionRe: getting an error when servers wants to upload next image [modified]memberwagstaff14:33 1 Jan '07  
GeneralDoesn't work at all in Firefoxmembercbgthree12:11 26 Nov '06  
GeneralRe: Doesn't work at all in FirefoxmemberLang Deng12:37 26 Nov '06  
AnswerRe: Doesn't work at all in Firefoxmemberwagstaff12:41 1 Jan '07  
GeneralRe: Doesn't work at all in Firefoxmemberyann_lh17:51 17 Jan '07  
GeneralRe: Doesn't work at all in Firefoxmemberalkl1204:00 23 Apr '07  
GeneralRe: Doesn't work at all in FirefoxmemberAzul SkyKnight7:33 6 Jun '07  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 30 Mar 2006
Editor: Smitha Vijayan
Copyright 2006 by Lang Deng
Everything else Copyright © CodeProject, 1999-2008
Web08 | Advertise on the Code Project