Custom data and configuration

Jan 3, 2008 at 8:33 AM
Lovin this code - it is completely genius

One question: is there a way to specify the data.xml files and configuration.xml that the control uses rather than use the defaults? I would like to dynamically generate the files from a database and while I could get the web server to map those URLs onto special http handlers it would be easier if I could just point them at another aspx that happens to produce XML.

I thought I could get this from one of the samples which do not have those files in the directory but my javascript is not quite good enough to understand how they work.

Thanks
Jan 3, 2008 at 12:49 PM
I've got exactly the same idea as you...
Here is what I've done:
I've got two tables in my database, one called albums and the other photos then I have a stored proc that produces the XML.
On the webserver I have an ashx that outputs the xml into the response.outputstream.

The settings you are after are this:
For the settings you are after have a look at this post:
http://www.codeplex.com/SlideShow/Thread/View.aspx?ThreadId=19171

In the configuration file setting that the post referes to, just point it to your handler insread of the xml file.

I'll post what I've done as soon as I'm finished.

Regards,
Morten
Coordinator
Jan 3, 2008 at 9:33 PM

rjam1234 wrote:
Lovin this code - it is completely genius

One question: is there a way to specify the data.xml files and configuration.xml that the control uses rather than use the defaults?

Thanks for the compliment! To change the default data and configuration sources, please see this thread which I think answers your question exactly.

Alternatively, if you want to get really creative, you can write your own custom data and configuration provider(s). Please see the XmlConfigProvider, XmlDataProvider, and/or the FlickrDataProvider classes included in the source code for guidance.