C
cindy
I am using Ajax panels to show progress when a button inside an update panel
executes a procedure “Chart2_Load†to fill a chart also inside an update
panel. It works the progress panel behaves correctly.
When the page loads initially the chart is filled with a default values and
the progress bar does not show during the initial page load, this is also the
longest time to wait for the load.
protected void Page_Load(object sender, EventArgs e)
{
if (!(Page.IsPostBack))
{
Chart2_Load(TextStart, TextEnd);
}
}
How can I show simple waiting message with Javascript or tell me what I am
doing wrong with Ajax to get the progress panel to display during the first
page load seen above? Progress panel is NOT associated with a specific
update panel.
I have included the html for the panels below.
User requirements are to load the page initial with default values and not
ask them to click before chart loads first time.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<style type="text/css">……..
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="QuarterUpdatePanel" runat="server"
ChildrenAsTriggers="true" UpdateMode="Always">
<ContentTemplate>
<aspataList id="dlButtons runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="PieUpdatePanel" runat="server"
OnLoad="PieUpdatePanel_Load" ChildrenAsTriggers="true" UpdateMode="Always">
<ContentTemplate>
<dotnet:Chart id="ChartPie" runat="server"/>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server"
ChildrenAsTriggers="true" UpdateMode="Always">
<ProgressTemplate>
<div id="OuterTableCellOverlay">
<div id="InnerTableCellOverlay">
<b>... LOADING ...</b>
<asp:Image ID="LoadImage" runat="server"
ImageUrl="~/Images/ajax-loader.gif" />
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="ChartUpdatePanel" runat="server"
OnLoad="ChartUpdatePanel_Load">
<ContentTemplate>
<dotnet:Chart id="Chart5" runat="server"/>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
executes a procedure “Chart2_Load†to fill a chart also inside an update
panel. It works the progress panel behaves correctly.
When the page loads initially the chart is filled with a default values and
the progress bar does not show during the initial page load, this is also the
longest time to wait for the load.
protected void Page_Load(object sender, EventArgs e)
{
if (!(Page.IsPostBack))
{
Chart2_Load(TextStart, TextEnd);
}
}
How can I show simple waiting message with Javascript or tell me what I am
doing wrong with Ajax to get the progress panel to display during the first
page load seen above? Progress panel is NOT associated with a specific
update panel.
I have included the html for the panels below.
User requirements are to load the page initial with default values and not
ask them to click before chart loads first time.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<style type="text/css">……..
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="QuarterUpdatePanel" runat="server"
ChildrenAsTriggers="true" UpdateMode="Always">
<ContentTemplate>
<aspataList id="dlButtons runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="PieUpdatePanel" runat="server"
OnLoad="PieUpdatePanel_Load" ChildrenAsTriggers="true" UpdateMode="Always">
<ContentTemplate>
<dotnet:Chart id="ChartPie" runat="server"/>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server"
ChildrenAsTriggers="true" UpdateMode="Always">
<ProgressTemplate>
<div id="OuterTableCellOverlay">
<div id="InnerTableCellOverlay">
<b>... LOADING ...</b>
<asp:Image ID="LoadImage" runat="server"
ImageUrl="~/Images/ajax-loader.gif" />
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="ChartUpdatePanel" runat="server"
OnLoad="ChartUpdatePanel_Load">
<ContentTemplate>
<dotnet:Chart id="Chart5" runat="server"/>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>