Hello, I need to have three ajax update progress controls on one page. The problem im having is that when an event is triggered for any of the update panels none of the update progress controls appear. What am I doing wrong. Heres my code:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Image ID="SiteOneThumb" runat="server" Height="158px" Width="210px" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="SiteOneTextBox" EventName="TextChanged" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<img src="http://pics.10026.com/?src=Images/loading.gif" /> <br />
Retrieving Thumbnail...
</ProgressTemplate>
</asp:UpdateProgress
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Image ID="SiteTwoThumb" runat="server" Height="158px" Width="210px" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="SiteTwoTextBox" EventName="TextChanged" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel2">
<ProgressTemplate>
<img src="http://pics.10026.com/?src=Images/loading.gif" /> <br />
Retrieving Thumbnail...
</ProgressTemplate>
</asp:UpdateProgress
<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<ContentTemplate>
<asp:Image ID="SiteThreeThumb" runat="server" Height="158px" Width="210px" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="SiteThreeTextBox" EventName="TextChanged" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress3" runat="server" AssociatedUpdatePanelID="UpdatePanel3">
<ProgressTemplate>
<img src="http://pics.10026.com/?src=Images/loading.gif" /> <br />
Retrieving Thumbnail...
</ProgressTemplate>
</asp:UpdateProgress>
Thanks!
Hi.
Why dont you use only one Updatepanel and updateprogress control and bind different asynchronous events to this update panel. And it shud work.
If i am in wrong direction, please elaborate more.
Cheers
Hi I think it cannot be done currently. Atleast i think so . I have tried it. Probably you can use any no of updatepanels but a single updateprogress control.We can set this update progress control to monitor all the partial rendering happens in the entire page.To implement that just remove the AssociatedUpdatePanelID property. By default it will watch the entire page for all Partial renderings.
hello.
well, if i'm not mistaken, i'm under the impression that updateprogress will only work if the postback is started by a control placed inside an updatepanel. anyway, not all is lost :)
you can hande the beginRequest and endRequest client event fired the by the client pagerequestmanager object that is inserted on the page when you use updatepanels. during the beingrequest, you need to get a reference to the control responsible for the async postback and you need to map it to the "correct" updateprogress control. after doing this, you only need to show the contents of that updateprogress by setting the display (or visible) css property of it. dyuring the endrequest event, you need to hide the contents of the panel again.
No comments:
Post a Comment