using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using AjaxControlToolkit;
using System.Web.Script.Services;
/// <summary>
/// Summary description for WebService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService {
public WebService () {
}
public class SlideComplete : WebService
{
public SlideComplete()
{
}
[WebMethod(), ScriptMethod()]
public AjaxControlToolkit.Slide[] GetSlides(string contextKey)
{
return new AjaxControlToolkit.Slide[] {
new AjaxControlToolkit.Slide("~/Images/Image1.jpg", "Poverty", "End Poverty"),
new AjaxControlToolkit.Slide("~/Images/Image2.jpg", "Hunger", "End Hunger"),
new AjaxControlToolkit.Slide("~/Images/Image3.jpg", "Help", "Help"),
new AjaxControlToolkit.Slide("~/Images/newbanner.jpg", "banner", "banner")
};
}
}
}
I need to be able to get this AJAX done by today. Help??
and I would consider to increase the play interval since that is a very low value. And your web service should be more like:
/// <summary>
/// Summary description for WebService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService
{
[WebMethod()]
[ScriptMethod()]
public AjaxControlToolkit.Slide[] GetSlides(string contextKey)
{
return new AjaxControlToolkit.Slide[] {
new AjaxControlToolkit.Slide("~/Images/Image1.jpg", "Poverty", "End Poverty"),
new AjaxControlToolkit.Slide("~/Images/Image2.jpg", "Hunger", "End Hunger"),
new AjaxControlToolkit.Slide("~/Images/Image3.jpg", "Help", "Help"),
new AjaxControlToolkit.Slide("~/Images/newbanner.jpg", "banner", "banner")
};
}
}
and I would consider to increase the play interval since that is a very low value. And your web service should be more like:
/// <summary>/// Summary description for WebService/// </summary>[WebService(Namespace="http://tempuri.org/")][WebServiceBinding(ConformsTo=WsiProfiles.BasicProfile1_1)][System.ComponentModel.ToolboxItem(false)]// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. [System.Web.Script.Services.ScriptService]publicclassWebService:System.Web.Services.WebService{[WebMethod()][ScriptMethod()]publicAjaxControlToolkit.Slide[]GetSlides(string contextKey){returnnewAjaxControlToolkit.Slide[]{newAjaxControlToolkit.Slide("~/Images/Image1.jpg","Poverty","End Poverty"),newAjaxControlToolkit.Slide("~/Images/Image2.jpg","Hunger","End Hunger"),newAjaxControlToolkit.Slide("~/Images/Image3.jpg","Help","Help"),newAjaxControlToolkit.Slide("~/Images/newbanner.jpg","banner","banner")};}}
Best regards
Johan
Some how it still doesn't work. But when I inspect element on Google Chrome, I got this error: Failed to load resource: the server responded with a status of 500 (Internal Server Error)http://localhost:50495/Project1/WebService.asmx/GetSlides
Member
2 Points
3 Posts
Slide show extender not working on site master
Feb 11, 2014 12:09 AM|JustinDC7|LINK
I have place the slideshow extender on my site master but it wont work here's my code:
Site master:
webservice:
I need to be able to get this AJAX done by today. Help??
Dillon Chong.
I hope I helped :)
Participant
1390 Points
323 Posts
Re: Slide show extender not working on site master
Feb 11, 2014 03:28 PM|valuja|LINK
Hi,
You have a couple of errors in your code that needs to be corrected, in the master page your SlideShowExtender should look like:
and I would consider to increase the play interval since that is a very low value. And your web service should be more like:
Best regards
Johan
Member
2 Points
3 Posts
Re: Slide show extender not working on site master
Feb 11, 2014 06:48 PM|JustinDC7|LINK
Some how it still doesn't work. But when I inspect element on Google Chrome, I got this error: Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Dillon Chong.
I hope I helped :)
All-Star
30411 Points
3628 Posts
Re: Slide show extender not working on site master
Feb 12, 2014 01:21 AM|Fuxiang Zhang - MSFT|LINK
Hi JustinDC7,
Thank you post the issue to asp.net forum.
For using the SlideShowExtender, other member has provided you an example and you can also refer to its' article.
http://www.asp.net/AjaxLibrary/AjaxControlToolkitSampleSite/SlideShow/SlideShow.aspx
For the 500 error, that indicates and error on the server, not anything with your client code. Please check your web service code or debug it.
http://pcsupport.about.com/od/findbyerrormessage/a/500servererror.htm
Hope this helps, thanks.
Best Regards!
Member
2 Points
3 Posts
Re: Slide show extender not working on site master
Feb 12, 2014 01:49 AM|JustinDC7|LINK
It worked!!! Thanks!!!! THANK YOU VERY MUCH!!!!
Dillon Chong.
I hope I helped :)