Click here to Skip to main content
6,595,854 members and growing! (17,471 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.
C#, Javascript, XML, HTML, Windows, .NET, ASP.NET, Ajax, VS2005, Dev
Posted:30 Mar 2006
Views:116,603
Bookmarked:64 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
23 votes for this article.
Popularity: 4.54 Rating: 3.33 out of 5
5 votes, 21.7%
1
3 votes, 13.0%
2
1 vote, 4.3%
3
6 votes, 26.1%
4
8 votes, 34.8%
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


Member

Occupation: Web Developer
Location: United States United States

Other popular Ajax and Atlas articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 61 (Total in Forum: 61) (Refresh)FirstPrevNext
GeneralDemosite PinmemberMarkus Bertram22:03 26 Jul '09  
QuestionUrl Path PinmemberManoj Kiean22:22 24 Jun '09  
Generalcode for prev and next Pinmemberxccx12:28 9 Jun '09  
GeneralExcellent Code - Modified !!! PinmemberKeith Pitts11:32 20 Apr '09  
GeneralRe: Excellent Code - Modified !!! Pinmemberxccx12:23 9 Jun '09  
Questionhow to make every image as a link in slide show PinmemberMember 368014222:14 7 Apr '09  
Generalhow to using silde show 3 time on one page!! Pinmemberkenuycyc10:17 17 Mar '09  
GeneralHow to limit transition effects? PinmemberPeter Afonin17:12 8 Feb '09  
GeneralThe Master Page PinmemberShakthivelpr0:36 5 Feb '09  
QuestionTransitions in IE AND in Firefox? PinmemberPCAssist_Northwest22:44 17 Jan '09  
GeneralDo you have the code...... Pinmembert-hawkbasketball15:59 4 Oct '08  
GeneralDeng It's Awesome!!! PinmemberM. Shakeel Anjum22:59 21 Jul '08  
GeneralRandom to Ordered Pinmemberasewefy0:17 20 Sep '07  
GeneralNo thumbnails PinmemberEdwardJr10:06 21 Aug '07  
GeneralRe: No thumbnails PinmemberLang Deng10:23 21 Aug '07  
GeneralRe: No thumbnails PinmemberEdwardJr11:03 21 Aug '07  
QuestionWeb Photo Album Pinmembersides_dale16:53 28 May '07  
AnswerRe: Web Photo Album PinmemberLang Deng14:39 29 May '07  
GeneralMaster Page Pinmemberalexaz110:18 7 May '07  
GeneralRe: Master Page PinmemberLang Deng15:56 7 May '07  
GeneralDoesn't work in Firefox Pinmembercykophysh391:08 23 Feb '07  
QuestionDose not support mozilla browser Pinmembergurusewack22:13 12 Jan '07  
AnswerRe: Dose not support mozilla browser Pinmembercykophysh3916:07 23 Feb '07  
QuestionAjax slideshow Pinmemberwagstaff17:32 31 Dec '06  
AnswerRe: Ajax slideshow PinmemberLang Deng9:41 1 Jan '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-2009
Web17 | Advertise on the Code Project