Sir, I am Getting an error when using:-
string[] imageName = System.IO.Directory.GetFiles(Server.MapPath("/Photos"));
Getting error that : An object reference is required for the non-static field, method, or property 'System.Web.UI.Page.Server.get'
Why getting this error, is the lack of namespace or reference?
Loading

Sanjeeb LenkaPosted Sep 5, 2013, 1:27 AM
check this attached sample. if any doubt reply.
Sanjeeb LenkaPosted Sep 5, 2013, 2:47 AM
these are webservice files. you can get it by adding new item of webservice in your project.
Bineesh ViswanathPosted Sep 5, 2013, 2:45 AM
My program is being worked by adding the SlideShow.cs and SlideShow.asmx.
How can get this files, what are they?
Bineesh ViswanathPosted Sep 5, 2013, 1:49 AM
The file you given is working perfectly.
Bineesh ViswanathPosted Sep 5, 2013, 1:12 AM
I want the function of Images being Slided.
My program is running, but no images is showing.
Here the html code for the SlideShowExtender.
TargetControlID="imgslides" SlideShowServicePath="~/Photos/" SlideShowServiceMethod="GetSlides">
and the .aspx.cs code:-
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static AjaxControlToolkit.Slide[] Slide()
{
string[] imageName = System.IO.Directory.GetFiles("~/Photos/");
AjaxControlToolkit.Slide[]photos=new AjaxControlToolkit.Slide[imageName.Length];
for (int i = 0; i < imageName.Length; i++)
{
string[] fileName = imageName[i].Split('\\');
photos[i] = new AjaxControlToolkit.Slide("Photos/" + fileName[fileName.Length - 1], fileName[fileName.Length - 1], "");
}
return photos;
}
The Image Folder is a folder I created(SolutionExplorer->New Folder(named it Photos)->add existing items(added images to it)
Sanjeeb LenkaPosted Sep 5, 2013, 1:01 AM
plz provide more details. what actually you want. plz share code.