This is a migrated thread and some comments may be shown as answers.

Ajax Loading Panel Question

2 Answers 73 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
JDT
Top achievements
Rank 1
JDT asked on 10 Jun 2009, 10:56 PM
Hi All,

The asp.net ajax controls documentation has a great example of how to show a loading panel on initial page load. What would we have to do to have some text under the animated gif changing based on some server side work?

So it would look like.
[Loading.gif]
Loading frames...

then...
[Loading.gif]
Adding Layers...

then....
and finally showing the page.

Something like
 protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            if (e.Argument == "InitialPageLoad")
            {
  //simulate longer page load
                System.Threading.Thread.Sleep(2000);
                Label lbl = (Label)RadAjaxLoadingPanel1.FindControl("labelLoading");
                lbl.Text = "Adding Layers...";
                System.Threading.Thread.Sleep(2000);
                Panel2.Visible = true;

Is there a way to have the server send the new label text back to the client and have it refreshed? It looks like one can either poll from the client, or push from the server (reverse ajax) what's the Telerik way to accomplishing this?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 16 Jun 2009, 07:07 AM
Hello JDT,

I am afraid that you cannot change the RadAjaxLoadingPanel message during the ajax request, neither client side or server side. Note that the Label text would change only once, after the request finishes. The easiest way to achieve your goal is to add an animated image in the loading panel which displays the desired text.

I hope this helps.

Regards,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
JDT
Top achievements
Rank 1
answered on 17 Jun 2009, 06:48 PM
Didn't think of that. Thanks for the tip!
Tags
Ajax
Asked by
JDT
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
JDT
Top achievements
Rank 1
Share this question
or