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

LoadingPanel on Page_Load

1 Answer 87 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 2
Jason asked on 20 May 2009, 08:51 PM
Hi,

I have adapted some code previously posted on this forum to display a RadAjaxLoadinPanel when an image is being retrieved from the server and displayed to the user. 

    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <div> 
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" > 
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="ImageButton1">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="ImageButton1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
                Width="300px" IsSticky="false" EnableSkinTransparency="true" > 
                <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
                    style="border: 0px;" /> 
            </telerik:RadAjaxLoadingPanel> 
        </div> 
    <asp:ImageButton ID="ImageButton1" runat="server" Height="300px"   
            ImageUrl="~/hiresC6RNCassette.jpg" Width="300px" /> 
    </form> 

 

However, I would like to be able to view the LoadingPanel when the page is first loaded (Page_Load event) as well as when a ajax postback occurs.

Also, the image in the RadAjaxLoadingPanel sits at the top of my image that caused the post back.  Is there any way to get the loading image to be situated in the center (horizontally and vertically) of my ImageButton?

Does anyone have any ideas how I might be able to get this code to behave how I would like it to?

 

Many thanks,

 

Jason.

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 25 May 2009, 11:01 AM
Hi Jason,

Although RadAjaxLoadingPanel is designed to be shown on AJAX updates, someone would like to show it on initial page load as well. It is not supported out of the box, however it is easy achievable using some additional code.
More information is available in the following help topic.
Show RadAjaxLoadingPanel on initial page load

Additionally,  how to change the position of the loading image you can learn from the following topic in the online help.

Sincerely yours,

Pavlina
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.
Tags
Ajax
Asked by
Jason
Top achievements
Rank 2
Answers by
Pavlina
Telerik team
Share this question
or