hi guys i am having this small issues with image slider, it shows in the broswer just one picture, than slider continues but it does not show the content of the other pictures(can not read them).
i have 8 pictures in my Images folder in my project, but it reads just one, i am dealing with it for almost 4 hours now, and i can not figure it out if the problem is with my program or browser(and tried with 3 different browsers).

heres my code hope you will help me

protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SetImageUrl();
        }
    }
    protected void Timer1_Tick(object sender, EventArgs e)
    {
        SetImageUrl();
    }

    private void SetImageUrl()
    {
        if (ViewState["ImageDisplayed"] == null)
        {
            Image1.ImageUrl = "~/Images/1.jpg";
            ViewState["ImageDisplayed"] = 1;
            Label1.Text = "Displaying Image -1";

        }
        else
        {
            int i = (int)ViewState["ImageDisplayed"];
            if (i == 8)
            {
                Image1.ImageUrl = "~/Images/1.jpg";
                ViewState["ImageDisplayed"] = 1;
                Label1.Text = "Displaying Image -1";
            }
            else
            {
                i = i + 1;
                Image1.ImageUrl = "~/Images" + i.ToString() + ".jpg";
                ViewState["ImageDisplayed"] = i;
                Label1.Text = "Displaying Image-" + i.ToString();
            }
        }

haye... u simply use marquee 4 slider show .

use this code........

<marquee direction:"right">
....
</marquee>

u just choose pic's inside this tag from theme folder in solution explorer of microsoft visual studio .... good luck

Did you include the script manager control in your aspx page? Set the timer interval?

Timer control overview

Yes i have included script manager, also the timer interval is set to 5000milisekonds, it works fine but just it does not show the content of pictures except the first one, but no problem i am trying to change and use a XML file because also i want to use the picture names(not rename it from 1 to 8) like in my case. The reaason why i want is because i want to be able to have a button there to stop the image slicing. I will try it my self than if i have any problem well be in touch again. Thanks u all for trying help, really happy with Daniweb Comunity.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.