hi,
I had the same problem using the sample code couple years ago. I posted a solution on
http://www.asp.net/web-forms/videos/ajax-control-toolkit/how-do-i-use-the-aspnet-ajax-slideshow-extender[
^] Hope it will works for you too.
"
hi, i figured it out, we should include [System.Web.Script.Services.ScriptService], remove the static and everything remain the same. This will take care of the error "unknown web method GetSlides..." here is a sample for SlidesService.cs:
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Script.Services;
using System.Web.Services.Protocols;
using System.Configuration;
using System.Web.UI.WebControls;
using System.Web.UI;
[WebService(Namespace = "<a rel="nofollow" target="_new" href="http:
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class SlidesService : System.Web.Services.WebService {
public SlidesService () {
}
[System.Web.Services.WebMethod]
public AjaxControlToolkit.Slide[] GetSlides()
{
System.Web.UI.WebControls.SqlDataSource ds = new SqlDataSource();
ds.ConnectionString = ConfigurationManager.ConnectionStrings["pictureConnectionSt ring"].ConnectionString;
string testConn = ConfigurationManager.ConnectionStrings["pictureConnectionSt ring"].ConnectionString;
string mySelect;
int count = 0;
mySelect = "SELECT TOP 20 * FROM [pictureName] ORDER BY NEWID()";
ds.SelectCommand = mySelect;
System.Data.DataView dv = (System.Data.DataView)ds.Select(new DataSourceSelectArguments());
count = dv.Table.Rows.Count;
AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[count];
try
{
for (int i = 0; i < count; i++)
{
slides[i] = new AjaxControlToolkit.Slide("images/" + dv.Table.Rows[i]["path"].ToString(),
dv.Table.Rows[i]["name"].ToString(),
dv.Table.Rows[i]["description"].ToString());
}
}
catch { }
return (slides);
}
}
"