Click here to Skip to main content
Licence CPOL
First Posted 30 Mar 2006
Views 189,233
Downloads 5,656
Bookmarked 75 times

An ASP.NET Slide Show

By Lang Deng | 30 Mar 2006
A simple slide show using AJAX in ASP.NET.
6 votes, 20.7%
1
3 votes, 10.3%
2
1 vote, 3.4%
3
9 votes, 31.0%
4
10 votes, 34.5%
5
3.36/5 - 29 votes
μ 3.40, σa 2.75 [?]

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

Web Developer

United States United States

Member


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMy vote of 4 Pinmemberveerendra.p22:37 22 Jun '11  
GeneralSlideshow does not ID Pinmember55kamelot5510:26 4 Mar '11  
QuestionSlide show does not work PinmemberColeenh3:15 28 Sep '10  
GeneralMozilla FireFox Pinmembermohsen.karami9:55 2 Aug '10  
Generalslide show Pinmembernaveen.prasad1523:56 28 Jun '10  
GeneralMy vote of 1 Pinmemberravichaudhari0:55 15 Jun '10  
GeneralCode Not Compatable with Different Browsers. Pinmembernehathakurcodeproject21:45 3 Dec '09  
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  
Questionhow to using silde show 3 time on one page!! Pinmemberkenuycyc10:17 17 Mar '09  
QuestionHow 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  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120209.1 | Last Updated 30 Mar 2006
Article Copyright 2006 by Lang Deng
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid