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.
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.