Posted by Nazar Rizvi on 11/13/2007 6:05 AM | Comments (4)

I have been trying to use the slideshow control so that the images fade in and fade out. I tried searching various forums out there but there is no actual solution for it. Undecided 

Finally I added up few AJAX animation effects to the slideshow container which would give you the desired effect.

NOTE: This is sort of an hack where in you have to manually time the fading in and out effects and the slideshow timing.

Also since this is continuous javascript this might put a little bit load on the user's browser.

Below is my code:

<script runat="Server" type="text/C#">

[System.Web.Services.WebMethod]

[System.Web.Script.Services.ScriptMethod]

public static AjaxControlToolkit.Slide[] GetSlides()

{

return new AjaxControlToolkit.Slide[] {

new AjaxControlToolkit.Slide("images/Autumn Leaves.jpg", "", ""),

new AjaxControlToolkit.Slide("images/Creek.jpg", "", ""),

new AjaxControlToolkit.Slide("images/Dock.jpg", "", ""),

new AjaxControlToolkit.Slide("images/Forest.jpg", "", "")};

}

</script>

<div>

<asp:Image ID="Image1" runat="server" Width="800px" Style="border: 1px solid black;

width: auto" ImageUrl="images/Creek.jpg" AlternateText="ME" /><br />

</div>

<cc1:SlideShowExtender ID="slideshowextend1" runat="server" TargetControlID="Image1"

SlideShowServiceMethod="GetSlides" AutoPlay="true" ImageTitleLabelID="imageTitle"

ImageDescriptionLabelID="imageDescription" PlayInterval="7000" Loop="true" />

<cc1:AnimationExtender ID="MyExtender" runat="server" TargetControlID="Image1">

<Animations>

<OnLoad>

<Sequence iterations="0">

<FadeIn Duration="10.0" Fps="5" />

<FadeOut Duration="10.0" Fps="5" />

</Sequence>

</OnLoad>

</Animations>

</cc1:AnimationExtender>

Comments (4) -

QuynhTD
QuynhTD Vietnam on 11/18/2007 7:38 PM I tried this but the Image1 can not change to the next photo. Can u send me your source of program?
Thank you very much!
Nazar Rizvi
Nazar Rizvi United States on 11/20/2007 8:14 PM I shall email it to you.
Ahmet Apaydin
Ahmet Apaydin United States on 9/24/2008 8:06 PM Hi Nazar,

I am working on ajax toolkit slideshowextender and I am able to make it work. It is getting the data from the database and everything is good. I am also able to display the Description and the title of the picture that is being displayed.

I am trying to add ajaxtoolkit rating to the page. So when the image is changed on the slideshow, it will show the rating of that image. I tested the ajax toolkit rating on a seperate page and it works fine but when I try to get the id/name of the image that is displayed to show the rating, I could not make it work.

So when the slide is changed to a new slide, it will show the rating result from the database.

Do you have any idea how can I do it top of your head?

Thank you for your help in advance.
Ahmet
Annabell Charley
Annabell Charley United States on 7/23/2011 9:25 AM I love your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz answer back as I'm looking to design my own blog and would like to find out where u got this from. thanks

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading