AJAX :: How Implement Transformations In Slideshow Extender
Aug 21, 2010i am working on ajax slideshow extender.
1) implement transformations between slide to slide.
2) and the direction means orientation in changing of slides.
i am working on ajax slideshow extender.
1) implement transformations between slide to slide.
2) and the direction means orientation in changing of slides.
I have found all kinds of tutorials on the web showing how to implement the AJAX slideshow extender, but can't get them to work. All I want to do is put a simple slideshow on a master page. I want to use a code behind file for the c# (do not want the script on the page itself.
I ran into a couple of problems with the samples on the web. Specifically when I try to add System.Web.Services.WebMethod and System.Web.Script.Services.ScriptMethod - VS 2010 doesn't know what the "WebMethod" or the "ScriptMethod" are. Further, VS2010 express keeps telling me "{" expected - on the line AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[5];
Every tutorial on the web seems to be for ASP.net 2.0 - and is at least 2 years old. Is there an easier way in ASP.Net 4 to implement the slideshow control? I am new to c# in general, so if someone could provide a simple cs codebehind file - and the code on the aspx page, that would be great. I understand more than I can write.
The Slideshow isnt looping, however, it appears that the page is trying to refresh itself for each loop interval (I can see this at the bottom: downloading ...)
This should work because Im basically used the same code thats in the demo, minus the labels and buttons, and modified the web.config to be identical as well.
[Code]....
Here is the web.config:
[Code]....
I'm using ajax slideshow extender for a slideshow. How do I use an imagebutton to play/pause slideshow. I would have to change the imageurl with the corresponding action...
View 1 RepliesI'm using the Slideshow extender and have a vexing problem that I can't see to solve. The slidehow itself works fine, but I am trying to get the value of the ImageDescriptionLabelID into a javascript variable when the slide changes. Using this code in a javascript function:
[Code]....
It appears that the add_slideChanging event fires BEFORE the image (and accompanying label) change. Is there an event that occurs AFTER the image changes?If not, any ideas on how I can make the number I'm successfully passing in the lblDesc control available to javascript?
how can we have the ajax slide show which take the image path from database, instead of define the image path static in service method.
View 1 Replieswhat i am trying to achieve is a single image control with slideshow extender attached which when of the category option buttons are pressed the SlideService goes get the images for that category from the image folder sub folders and starts to display them i have got the code to work as to, the point that i have to hardcode the images sub folders path in to the webmethod - but i want the image folder name to be passed as a parameter when the webmethod GetSlides is called - the code i have so far is From the aspx page - (the category name will be a string retrieved from the button text when clicked
[Code]....
I have a slideshow extender, I will change the slideshow extender's contextkey value by a button click event. So that after button click the slideshow will display different set of image. Originally with postback everything work fine, but I don't want the whole page to refresh.
So I put the slideshow extender inside an updatepanel with triggers target the button click event. Now the whole page didn't refresh and the slideshow extender's contextkey value did change (same code as before) after button click event. However the image set on the slideshow didn't change.
I think I am missing some sort of slideshow extender reload or refresh call but I am not sure how to do this? I didn't see any related property with slideshow extender...
when I run my site that used Slideshow Extender, i get this Error:
Microsoft JScript runtime error: Sys.InvalidOperationException: Can't add a handler for the error event using this method. Please set the window.onerror property instead.
in localhost i ignore this Error and Slideshow Extender works correct.
but when i publish the site I have JScript Error and Slideshow Extender not be loaded.
I have this slideshow extender that works perfectly with hard coded images in the page method. However as soon as I try to make the page method get its images from the database it stops working; no images are returned.
I have tried to declare the datatable that the pagemethod uses both inside the pagemethod and in the on_load event. When in the last case I test the datatable contents by hooking it up to a gridview, it shows that it does get its proper data.
Declaring this dataTable as a private static dataTable, outside the page_load, to make it accessible in the page method (like in this --- post http://forums.asp.net/p/1115257/1726736.aspx---) also does not work.
So the page method with hard coded images works and also the query to the database works!
My slideshow extender work perfectly fine, but I want to retrieve the current display picture's information on the server side.
So I added a normal asp button on the same page as the slideshow extender. When button clicked, it fire off a server side function. In the function I grabbed the SlideShow's name label, description label or the Image, but none of them contain any current information of the picture displayed at slideshow extender.
Is there another way to obtain the slideshow extender current state? Or am are those name, description label text value should be updated?
I need to set up the slide show based on a querystring parameter. I thought I had this figured out, but I clearly don't understand something about how the webservice works. I have this in the .aspx page:
<asp:Button ID="btnPrev" runat="server" Text="Prev" />
<asp:Button ID="btnPlay" runat="server" Text="Play" />
<asp:Button ID="btnNext" runat="server" Text="Next" />
<asp:Label ID="lblDesc" runat="server" />
<cc1:SlideShowExtender ID="SlideShowExtender1" runat="server" BehaviorID="SSBehaviorID"
TargetControlID="tstSlides"
AutoPlay="true"
ImageDescriptionLabelID="lblDesc"
NextButtonID="btnNext"
PreviousButtonID="btnPrev"
PlayButtonID="btnPlay"
PlayButtonText="Play"
StopButtonText="Stop"
Loop="true" >
</cc1:SlideShowExtender>
<asp:Image ID="tstSlides" runat="server" height="300px" Width="300px" />
And this in the code behind:.........................
how to implement autocomplete extender? i want to take datas from a particular table and store in autocomplete textbox.
View 5 RepliesHow to show the password strength when user type there password on the password textbox.....
View 1 RepliesI want to slideshow images from database, four images at a time.The images should slide after 2 seconds and slides should scroll from right to left.During this left most image should disappear and all remaining images should move to left,covering leftmost image. At the place of rightmost image a new image from database should be picked up.
View 1 RepliesI'm new to Ajax and use MS Visual Web Developer 2008 Express edition with VB and SQL Server Express.
I have a number of photos stored in individual folders and wish to use the Slideshow extender to display all images in a selected folder.
I've set up a small test slideshow which is similar to the Ajax Video tutorial but cannot get autoplay to work.
The page displayed show the "Play button" and the first image in my set of photos.
I've pasted my code below.
Also as I'm new to this I don't understand Namespace - Do I just replace this with my website URL?
Web Service file
mports System.Web
Imports System.Web.Services [code]....
I wonder if it is possible to have a clickevent for the SlideShow control. In this case I am now showing 2 images.
Is it possible in any way have a clickevent or to handle a click on the images that is showing to open up a browser with a URL like www.google.com ?
I beleive the Click event then should be in the Image Control in somehow ?
[Code]....
I'm using Visual Studio 2010.
Are there any step by step tutorials on how to use the SlideSHowExtender to create a slideshow?
I have had a look before posting but couldn't find any step by step info.
Each time I try to drag the SlideShowExtender to a web form I get a round black circle with a black line through the middle, in other words it won't let me use it and I must be trying to use this control incorrectly.
I'd like to create a slideshow that goes through 4 pictures with some text that pops up on to each picture. An example of this is here - [URL]
I think this is using AJAX slideshow and animation? where I can find a tutorial to do this? I've not been able to find one that mixes images and text in this way.
I'm using the slideshow extender, however the images are not a standard size. The images are user supplied, and they are often displayed full size, so I can't standardize them. I need a way to resize them on the fly, and have them look good.
I've been working on this slide show off and on for some time. I've had many false starts, finding out after putting in quite a bit of time and work that there is just one thing or another that I cant't get to work. I'm hoping this ajax extender will be the answer. It won't be if I can't rezise the images.
what the extender can use as image sources? I know it can use an image on the hard drive, which is where my images are, but then I have the size problem. I tried using a webpage that uses a third party control to resizde the image, but that didn't work. I'm looking at this site: [URL] for resizing the images, can the output be used by the extender?
I use the BetterImage Control [URL] to display my images. It allows me to add copyright text to the image and I can set maximum width and maximum height and have the image display without stretching. They have their own slideshow, but the documentation is very limited and I think it displays everything in the specified folder. I need to create slideshows on the fly.
I want to use the ajax slideshow extender, but I need to resize the images on the fly, and add the copyright text. Is there a way to use the slideshow extender with the Better Image Control? I'm going to look into adding the copyright text and do the resizing myself, but I'd rather not have to.
I would like to use the ajax slideshow extender and getting the Image Url stored in a databaseso far my webserivice look like this..but I think im making a mistake somewhere..its not working
<WebMethod()> _
Public Function GetSlides() As AjaxControlToolkit.Slide()
Dim Connection As SqlConnection
[code]...
An Ajax Toolkit SlideShow used to work in .NET 2.0. After being upgraded to 3.5 the same slideshow stops working as before. It always pops up "Object reference not set to an instance of an object.". Different rewrites cause different errors at embedded Jscript level that cannot be fixed. I have added the AjaxToolkit.dll 3.5 under bin folder and placed its items in the VS2008 toolkit.
View 5 RepliesI'm using Visual Web Developer 2008 Express Edition, coding in C#. I think that the framework that I am aiming for is 2.0.
I am working on some old projects here where I work. However, I do not have access, nor do I know what the original programmer used to write this code.
The following code gives me an error:
[Code]....
(note that SlideList is an ArrayList that is being assigned to a DataSource. Also, this code is found inside a function named "CreateFeaturedSlideShow", which is called by the function "Page_Load" in "default.aspx.cs")
When I try to compile the project I get this error code: "The type or namespace name 'slideShow' could not be found (are you missing a using directive or an assembly reference?)"
When I comment out the code, the project compiles. However, when I try to run it, I get another error message: "Only one of AdvertisementFile, DataSource, or DataSourceID properties can be set on AdRotator 'AdRotator1'. "
From examing the rest of the code, it seems like this part of the project is populating a database with advertisement data, and selecting an ad at random, and keeping track of various statistics.
My problem is that I am having difficulty locating anything that will give me a slideShow namespace. The top result seems to be the SlideShow Extender, but after adding this toolkit to my toolbox nothing changed, which leads me to believe that I have something else.
Does anybody know where I can find this 'slideShow' that is referred to in the code?
I have the following problem with a slideshow in Ajax. Hope I have put it in the right Ajax forum. Some info: I do use MS Access and in the 'autos table' i do have the following fields:
field 1: nummer (text field) - this is the name of the image
field 2: cat (integer) - this is the category of the cars
field 3: naam (text field) - this is the name of the car
field 4: model (text field - this is the model of the car
In my masterpage i do have a menu where you can make the choice of a certain category of cars. This is done by a call to: slideshow.aspx?cat=100 In Slideshow.aspx a panel is setup and also buttons to manipulate the found images. Also the AjaxToolkit:Slideshowextender is defined as follows:
<ajaxToolkit:SlideShowExtender ID="SlideShowExtender1" runat="server"
TargetControlID="Image1"
SlideShowServicePath="slideservice.asmx"
SlideShowServiceMethod="Getslides"
AutoPlay="true"
ImageTitleLabelID="Name"
ImageDescriptionLabelID="Desc"
NextButtonID="NextButton"
PlayButtonID="PlayButton"
PlayButtonText="Play"
StopButtonText="Stop"
PreviousButtonID="PrevButton"
PlayInterval="4000"
Loop="true"
ContextKey="catid" />
As you can see the contactkey is also defined.
Inside the codebehind of slideshow.aspx.vb their is a sub defined:
Partial Class Slideshow
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
SlideShowExtender1.ContextKey = Request.QueryString("catid")
End Sub
End Class
The call from slideshow.aspx is to a slideservice.asmx which contains:
<%@ WebService Language="VB" CodeBehind="~/App_Code/SlideService.vb" %>
Here we call slideservice.vb.
The coding of the slideservice.vb file is:
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data.OleDb
Imports System.Web.UI.Page
<WebService(Namespace:="http://vancouver.com/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
<System.Web.Script.Services.ScriptService()> _
Public Class SlideService
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function GetSlides(ByVal contextKey As String) As AjaxControlToolkit.Slide()
Dim strconn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|Vancouver.mdb"
Dim cn As New OleDbConnection(strconn)
Dim SQLStr As String
SQLStr = "SELECT nummer, naam, model FROM Autos WHERE ((Autos.cat) = @catid)"
Try
cn.Open()
Dim cmd As New OleDbCommand(SQLStr, cn)
Dim sCatid As String = ""
' Give the value to sCatid from contextkey
If sCatid.Trim().Length = 0 Then sCatid = contextKey
cmd.Parameters.AddWithValue("@catid", sCatid)
Dim thisReader As OleDbDataReader = cmd.ExecuteReader()
Dim photoCounter As Integer
While thisReader.Read()
photoCounter = photoCounter + 1
End While
If (photoCounter > 0) Then
'we now know how many pictures there are in this category of the database
Dim MySlides(photoCounter - 1) As AjaxControlToolkit.Slide
'set up the command string
Dim photoLookupCmd As New OleDbCommand(SQLStr, cn)
'and add the parameters to it for the category
photoLookupCmd.Parameters.AddWithValue("@catid", sCatid)
thisReader = photoLookupCmd.ExecuteReader()
Dim i As Integer
For i = 0 To photoCounter - 1
thisReader.Read()
Dim number As String = thisReader.GetString(0)
Dim name As String = thisReader.GetString(1) + " - " + thisReader.GetString(2)
MySlides(i) = New AjaxControlToolkit.Slide(("pictures" + number + ".jpg"), name, "")
Next
thisReader.Close()
Return MySlides
Else
Dim MySlides(0) As AjaxControlToolkit.Slide
MySlides(0) = New AjaxControlToolkit.Slide("pictures99999.jpg", "sorry - not available", "pls. mail us to report")
thisReader.Close()
Return MySlides
End If
Catch x As Exception
Dim MySlides(0) As AjaxControlToolkit.Slide
MySlides(0) = New AjaxControlToolkit.Slide("pictures99999.jpg", "Exception error", "pls. mail us to report")
Return MySlides
Finally
cn.Close()
End Try
End Function
End Class
When i run the code i will get an exception error and when following the code in debug mode i do see that inside the first loop in FOR i = 0 to photocounter - 1 : The first loop gets the right info from the database inside Myslide(1) fields. Going into the second loop i will get after dim name as string .....
the program goes to catch x as exception. I did see that number was found correctly during the previuous line. During an other debug session i noticed that the Parameter.item has the following error (which I do not understand), saying: Overload resolution failed because no accessible 'Itemī accepts this number of arguments.