ASP.NET Slide.Show control

Oct 12, 2008 at 6:02 PM

Hi, I wrote a data provider for Microsoft SharePoint but I can't make it show anything. I need to initalize the control using an inline script, as follows:

new SlideShow.Control({ 
    dataProvider: { type: 'SPDataProvider' }, 
    background: 'blue', 
    width: '100%', 
    modules: 
    [
        { module: [ { type: 'SlideViewer' } ] },
        { module: [ { type: 'SlideDescription' } ] },
        { module: [ { type: 'NavigationTray', option: [ { name: 'initialAlbumView', value: true } ] } ] },
    ],
    height: '200px' 
})

My provider gets successfully instantiated, collects all albums and slides, and calls the dataHandler. Are there any constraints on the returned data, that, if not met, would cause this behavior? The data seem to be pretty much the same as returned by the Flickr provider.

I am going to try the debug version, hopefully I will find something. Thanks in advance for any pointers.

Oct 12, 2008 at 10:16 PM

Hmm, it looks like I created the array-of-elements-with-attributes incorrectly. This seems to work:

new SlideShow.Control(
{
    dataProvider: { type: 'SPDataProvider' },
    modules:
    {
        module:
        [
            { type: 'SlideViewer'},
            { type: 'SlideDescription'},
            {
                type: 'NavigationTray',
                option: 
                [
                    { name: 'initialAlbumView', value: true }
                ]
            }
        ]
    }
}
Oct 13, 2008 at 2:26 AM
Edited Oct 13, 2008 at 2:27 AM


OK, basically I am now creating a full-blown self-contained ASP.NET control hosting the Slide.Show control. What does it do? It includes the scripts (can choose between debug and release version at compile-time) as WebResources from the assembly, then renders new SlideShow.Control({ ... });. Instead of having a Configuration.xml file, you set properties on the control. Currently, only the following basic settings are supported, but I will include more of them as needed.

var slideShow = new SlideShowControl()
{
    Configuration =
    {
        DataProvider = new SlideShowScript(
            "SPDataProvider", "DataProvider",
            GetType(), ThisAssembly.Scripts_SPDataProvider),
DataProviderOptions = { { "url", ImagingWebServiceUrl }, },
Scripts = {             // todo
            // new SlideShowScript(...),
            // new SlideShowScript(...), }, } }; Controls.Add(slideShow);

Would you like to include the thing into the project once it's reasonably complete?

Mar 23, 2009 at 6:44 PM
I would LOVE to see how you did this. Is it "reasonably complete" ?? :)
May 5, 2009 at 10:24 AM
Hello,
I'm trying to view Images from a sharepoint. Can you give us the source for the Sharepoint DataProvider?

Kind regards,