Using an Update Panel to Rotate through different .ascx files
<p>I have used the update panel and timer in the past to create a slideshow using ASP.net.  I would like to do the same thing, except instead or rotating through images, I'd like to rotate though .ascx file.  Is this possible?  This is what I have so far, but I am stuck on how to access the .ascx from the code behind file.</p>

<pre><code>&lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
    &lt;/asp:ScriptManager&gt;
    &lt;asp:UpdatePanel ID="SlideShow" runat="server" UpdateMode="Always"&gt;
        &lt;ContentTemplate&gt;
            &lt;img runat="server" id="SlideShowImage1" src="~/Controls/Testimonials.ascx" alt="Testimonial" /&gt;
            &lt;asp:Label runat="server" ID="SlideShowText" Text="First Slide" /&gt;
        &lt;/ContentTemplate&gt;
        &lt;Triggers&gt;
            &lt;asp:AsyncPostBackTrigger ControlID="SlideShowTimer" EventName="Tick" /&gt;
        &lt;/Triggers&gt;
    &lt;/asp:UpdatePanel&gt;
    &lt;asp:Timer ID="SlideShowTimer" runat="server" Interval="15000" OnTick="SlideShowTimer_Tick"&gt;
    &lt;/asp:Timer&gt;
</code></pre>

<p>Code Behind:</p>

<pre><code>    protected void SlideShowTimer_Tick(object sender, EventArgs e)
    {
        DateTime later = DateTime.Now.AddSeconds(.5);
        while (DateTime.Now &lt; later)
        {

        }

        this.SlideShowImage1.Src = RandomImageName();
        this.SlideShowText.Text = this.SlideShowImage1.Src.ToString();

    }
    private string RandomImageName()
    {

        Random rand = new Random();

        int RandomInt = rand.Next(0, 5);

        switch (RandomInt)
        {

            case 0:
                return "~/Controls/Testimonials.ascx";
                break;
            case 1:
                return "~/Controls/Testimonials2.ascx";
                break;
            case 2:
                return "~/Controls/Testimonials3.ascx";
                break;
            default:
                return "~/Controls/Testimonials4.ascx";
                break;

        }
    }
</code></pre>

<p>Thanks in advance!</p>
