Showing posts with label dynamic. Show all posts
Showing posts with label dynamic. Show all posts

Wednesday, March 28, 2012

AJAX treeview control

Does anyone have an example of building a dynamic checkbox treeview control using AJAX? I'd appreciate any pointers.

Thx,

-M

Treeviews aren't supported by the UpdatePanels in the current release of ASP.NET Ajax. I have heard that you can do this in the render event, but it would be very hacky. There are some 3rd party controls that handle that.

Wednesday, March 21, 2012

AJAX Slideshow using a dynamic Webservice to display images

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.