I've got a simple AlwaysVisibleControlExtender that extends a small Panel containing a "Loading..." message and animated GIF. The whole thing is inside an UpdateProgress control, so it only displays when my app is processing. I've got it set to display at the top center. It works fine, but I've noticed that it displays slightly to the right of where it should be. If I resize the window slightly, the panel snaps to the correct position.
My guess is that it's calculating where the center is before the UpdateProgress control allows the Panel to be rendered, thus the Panel has a width of zero. Only after the Panel is displayed does it correctly calculate the center. Is there a workaround for this?
Update: Here's the markup:
<%@ Page Language="VB" MasterPageFile="~/Compass.master" AutoEventWireup="false" CodeFile="SubmissionPrep.aspx.vb" Inherits="SubmissionPrep" Title="Untitled Page" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Always">
<ContentTemplate>
<%-- Data and Controls here --%>
<asp:UpdateProgress ID="ProcessingUpdateProgress" runat="server">
<ProgressTemplate>
<asp:Panel ID="ProcessingPanel" runat="server" CssClass="loading">
Processing...
<img src="images/ajax-loader.gif" alt="" />
</asp:Panel>
<ajax:AlwaysVisibleControlExtender ID="ProcessingAlwaysVisibleControlExtender" runat="server"
TargetControlID="ProcessingPanel" VerticalSide="Top" HorizontalSide="Center">
</ajax:AlwaysVisibleControlExtender>
</ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>