Sometimes, you want to rotate items out of a SharePoint list on a random basis in order to make this information available to your users, for example, some items that might be housed within your enterprise portal that would be helpful to rotate on something like your intranet frontpage displayed in no specified order are:
Technology Tips
Work Related Tips
Random Quotes
Company News
Upcoming Company Changes / Business Announcements
So, without further a due, a shocker of a WebPart, the AJAX Rotator WebPart.

The AJAX Rotator WebPart does what its name implies; it rotates things out of a SharePoint list. In order to eliminate a postback, it uses AJAX to load and rotate the items, nothing really fancy, but I needed a way to display task items randomly in a WebPart. To be honest I didn’t spend a lot of time on it because it was a nice to have thing, and not really used that heavily for my side project (I had under an hour to deliver it), so I just kinda whipped the damn thing out. It does take into account like object disposal etc., but I am sure some things could be cleaned up and other things introduced that would make it a little bit more applicable for other persons use. I dunno, I might be interested in doing something else with it, but hey, it was written on a whim really quick so I didn’t have the luxury of being that clever.
The AJAX Rotator WebPart is packaged within a SharePoint solution file (AjaxRotator.wsp) and the deploy.CMD file that will deploy your solution to your server. Once the solution if deployed, it is very, very easy to configure.
After successfully SharePoint Solution deployment On Your SharePoint Server:
Activate the SharePoint feature for the AJAX Rotator WebPart by going to the site collection features of the SharePoint instance by going to:
Site Actions -> Site Settings -> Site Collection Features -> activate the AJAX Rotator WebPart Feature
Once the feature is activated, add the WebPart to a WebPart page by going to Site Actions -> Edit Page
Once the WebPart is added, it must be configured by setting the WebPart properties, these are grouped under two sections, List Configuration and Labels and Message.
The first section is just the configuration options that are required, like the web where the list lives and the name of the list that should have its items rotated. There are some other configuration options that you can implement as well like if you want to pull a secondary field for display, and if there is a lot of characters that would normally be pulled from the secondary field, you can truncate that amount, if desired (you have to enable the truncation by selecting the checkbox). In this section you will also choose the rate of display that you would like items to be rotated in and out (I use 3000, but hey that’s just me).

The Labels and Messages section lets your adjust some of the textual interface components like the text that is used for the “read more” section, what text you want when items are loaded, etc. etc. etc They are pretty self explanatory.

I have only tested it with a task list, I haven’t tested it with any other types of lists. I am assuming because the code is kinda ambiguous it should work, but don’t get mad when it doesn’t. Like all the software that I release on this site, read the sharepointsecurity.com software disclaimer before you download it. (For those that don’t want to read it, it basically says this file and its parts is free for re-distribution, for use in both free and commercial applications, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.)
Anyhoo, you can download it here.











August 29th, 2007 at 2:03 am
[…] Sometimes, you want to rotate items out of a SharePoint list on a random basis in order to make this information available to your users, for example, some items that might be housed within your enterprise portal that would be helpful to rotate on something Read More……(read more) […]
August 29th, 2007 at 8:24 am
[…] AJAX SharePoint List Rotator WebPart rotates through list items to display one, formatted […]
August 30th, 2007 at 6:03 pm
[…] AJAX SharePoint List Rotator WebPart […]
August 31st, 2007 at 1:37 pm
This looks like a great webpart. I followed the install and it went well. Only problem is when I try to add it to a Team site, I get this error:
AJAX Rotator WebPart: Could not load file or assembly ‘System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified.
Any thoughts? Thanks, I really hope I can use this web part. BTW, this is on a MOSS 2k7 Enterprise setup.
September 1st, 2007 at 6:16 am
The System.Web.Extensions assembly is crucial to using AJAX within your SharePoint environment, which I am unsure whether it has been installed into your environment.
Here is a post that shows you how to install AJAX into your SharePoint environment.
http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3
It’s pretty simple, just install the AJAX package and then make some config changes, and you are ready to go. Here are some other links that target your error which I hope are helpful to you as well.
channel9.msdn.com/ShowPost.aspx?PostID=293825
www.thescripts.com/forum/thread586766.html
forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1942896&SiteID=1
September 9th, 2007 at 8:50 pm
Do you intend to release the source?
September 20th, 2007 at 5:13 am
I think I will, I just have to add the comments to the solution file.
September 25th, 2007 at 12:27 am
I am using WSS 3.0 and try to deploy the AjaxRotator.wsp file but it said “The file you imported is not valid. Verify that the file is a Web Part description file (*.webpart or *.dwp) and that it contains well-formed XML”. So do you have any suggestion on the problems?
September 25th, 2007 at 5:25 am
It should work just fine, let me verify the solution package quickly to make sure that the upload was the correct version.
November 13th, 2007 at 10:45 am
Any update on releasing the source? This looks way useful but I want to alter the functionality slightly to make the item displayed changeable using a dropdown, rather than a random display
Cheers
Gavin
November 30th, 2007 at 3:07 am
[…] Adam Buenz SharePoint MVP created a web part which rotates a list in a free AJAX SharePoint list rotator web part. Good chance to get your feet wet. I also like that he puts it in a solution deployment package WSP file. Good practice.
[…]
November 30th, 2007 at 3:15 am
[…] I was doing some searches for SP1 and noticed a number of references with anticipation for SP1 awaiting the big occasion. Here’s a couple of references: ASP.NET AJAX and SharePoint 2007 work together. Fitz even mentioned it a year ago in a post he did called Using ASP.NET AJAX in SharePoint sites: Tread lightly for now There have even been a couple of posts in anticipation of support on the team blog and Mike Ammerlaan’s blog on how to configure your SharePoint Server for ASP.NET AJAX including integration and performing the necessary installs and changes to your SharePoint Server and changes to the web.config to support ASP.NET AJAX Extensions. The SharePoint team blog has a preview of the information in SP1 that mentions that ASP.NET AJAX and creating custom web parts with the toolkit and extensions will be supported at SP1. “You can now use the Microsoft AJAX 1.0 Control toolkit for Microsoft ASP.NET or the AJAX 1.0 Extensions for ASP.NET to create Web Parts for asynchronous post pack. Beginning with WSS 3.0 SP1 and MOSS 2007 SP1, developers can create custom Web Parts using AJAX.” KB 941955 with a long title of “A Web Part that contains an ASP.NET AJAX 1.0 UpdatePanel control that uses the _doPostBack() function does not work when the URL of the hosting SharePoint Web site contains international characters.” This KB has a great workaround to prevent the a regular postback request occurs instead of an asynchronous ASP.NET AJAX postback request. The KB above includes code to add an UpdatePanel control to a Web Part and also uses the EnsureUpdatePanelFixups method to register the Script Manager control in the web part. Without the work around some caching of form actions and conflicts may occur. Although you won’t find any new ASP.NET AJAX in the features in the box, support for ASP.NET AJAX custom web parts does sound exciting to me. If you’re looking to build AJAX Solutions on SharePoint don’t miss the codeplex solution referred to as the SharePoint AJAX Toolkit by Daniel Larson SharePoint MVP Adam Buenz SharePoint MVP created a web part which rotates a list in a free AJAX SharePoint list rotator web part. Good chance to get your feet wet. I also like that he puts it in a solution deployment package WSP file. Good practice. Get ASP.NET 2.0 AJAX Extensions 1.0 at http://ajax.asp.net/This post originated from and is provided by the MSDN Blogs RSS feed. The original post of the article can be found here. […]
December 11th, 2007 at 11:04 am
[…] AJAX SharePoint List Rotator WebPart […]
December 11th, 2007 at 4:30 pm
No Source Code??!?
December 17th, 2007 at 6:23 am
Dear Sir/Madam,
We have inhouse employees who have been working on .net with sharepoint.we will outsource these candidates to companies on contract basis.
waiting for your speedy reply.
August 25th, 2008 at 1:57 pm
Install went fine. However, upon configuration, could not get a response from any of the buttons (OK, Cancel, Apply) in the web part mod part. Any ideas?
September 9th, 2008 at 10:53 pm
after adding the webpart & the list information , i was not able to see any output ,
the webpart keeps on displaying “Loading….”
September 22nd, 2008 at 3:45 am
I like the concept and would love to see the source code.
The problem I’ve got is that the first list item is never shown and during the time it should show, it just displays “Loading” and then skips to the second listitem which it displays correctly. After that it just keeps rotating between the second and following items and never shows the first list item (or the “loading” message) again.
Still, I would like to see the source code to see if I could fix it. I also would like it to work with Image libraries, as it doesn’t seem to be able to do so now.
Thanks for your time.
October 2nd, 2008 at 5:54 pm
I like the web part… it does almost exactly what I need. However I need to change the information that is displayed, as well as the way it is displayed. Is there any way I can get the source code so I can modify it to meet our needs? Thanks in advance!
October 15th, 2008 at 8:42 am
Good webpart sir! Are you planning to release the code soon? I have noticed few other people have requested for the code. please let us know.
Thanks
October 30th, 2008 at 5:23 pm
I’d like to check out this code; i’m writing about doing AJAX related sharepoint features here: http://point2share.wordpress.com/
November 13th, 2008 at 5:40 pm
[…] AJAX SharePoint List Rotator WebPart […]
January 2nd, 2009 at 2:24 am
Many thanks! It worked perfectly on my blog
January 20th, 2009 at 1:14 pm
[…] RE: Anuncios rotatorios Hola, LSH: Cada vez pides cosas mas dificiles… Mira a ver si esto te puede servir. Utiliza Ajax, supongo que no ser un problema… http://www.sharepointsecurity.com/bl…tator-webpart/ Por cierto, yo lo instale en un sharepoint 2007 en ingles y muy bien. No lo he probado en espaol… "LSH" wrote: > Buenas tardes, tengo una serie de anuncios o noticias pero quiero hacerlas > rotatorias que cambien cada 10 segundos en la pagina, como hago esto? > > > Gracias > > « Crear Carpeta | Apertura de nuevas ventanas desde el menu vinculos de la pagina principal del portal » […]
February 9th, 2009 at 12:35 pm
after adding the webpart & the list information , i’m not able to see any output , the webpart keeps on displaying “Loading….” im not sure if im missing something, can anyone help
March 10th, 2009 at 12:59 am
Hi Adam,
This is a fantastic work! We’d would love to see the source code. Wondering when would it be realeased? It seems like Loke first reqeusted it a year ago.
March 24th, 2009 at 6:27 am
Where is source code?
May 14th, 2009 at 7:55 am
This looks like a very interesting webpart, I also would like to see the source before actually deploying it on our dev/staging server…