Hi there,
I have just managed to get the example slideshow working within my own project. I would like to take it a step further by using a database and a folder within my site to display selected images.
Let me try explain.
For the ease of explaining things lets say a user adds their UserID into a textbox and pressing a button. I then have a select statement that gets all the image names for that user. The webmethod then uses those names from the SELECT statement to loop through the folder which contains the images and then displays the images within the slideshow.
The current web method looks like this
public static AjaxControlToolkit.Slide[] GetSlides() {return new AjaxControlToolkit.Slide[] {new AjaxControlToolkit.Slide("/images/Blue hills.jpg","Blue Hills","Go Blue"),new AjaxControlToolkit.Slide("/images/Sunset.jpg","Sunset","Setting sun"),new AjaxControlToolkit.Slide("/images/Winter.jpg","Winter","Wintery..."),new AjaxControlToolkit.Slide("/images/Water lilies.jpg","Water lillies","Lillies in the water"),new AjaxControlToolkit.Slide("/images/VerticalPicture.jpg","Sedona","Portrait style picture")}; }
As you can see everything is hard coded with the images and the comments and names.
Has anyone done something like this before?
Any advise or tips would be really helpful.
Thanks Shane
Check out forum posthttp://forums.asp.net/thread/1608950.aspx. It talks about passing in user context to retrieve images from the database.
No comments:
Post a Comment