Reputation: 2551
I have multiple update progress in my page in different places but they all have the id of one update Panel because i'm only using one update Panel my question is how can i let one update progress to display it's content when an update is done.
here is a sample of my code :
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Label ID="platformLabel" runat="server"
Text=" <%$Resources:Resource,SelectPlatform %>">
</asp:Label>
<asp:LinkButton ID="platformHyperLink" runat="server"
CssClass="platformElementHL"
CommandArgument='<%# Eval("PLATFORM_ID")%>'
OnClick="platformHyperLink_Click"
OnClientClick="ShowSearchButton();" />
<asp:Label ID="PlatformNameLabel" runat="server"
Text='<%# Eval("PLATFORM_NAME")%>' >
</asp:Label>
<telerik:RadButton ID="findDevice" runat="server"
Text="<%$Resources:Resource,Search %>"
OnClientClicked="HideTootltip"
OnClick="findDevice_Click"
style="display:none">
</telerik:RadButton>
<asp:UpdateProgress ID="updProgress1"
AssociatedUpdatePanelID="UpdatePanel" runat="server">
<ProgressTemplate>
<img src="App_Themes/WebPortalTheme/images/HomePage/icon-loading-
animated.gif" width="20" height="20" alt="Progress" />
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdateProgress ID="updProgress2"
AssociatedUpdatePanelID="UpdatePanel" runat="server">
<ProgressTemplate>
<img src="App_Themes/WebPortalTheme/images/HomePage/icon-loading-
animated.gif" width="20" height="20" alt="Progress" />
</ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
</asp:UpdatePanel>
When i click on the link button the updateProgress1 should be displayed and when i click on the radButton the updateprogress2 should be displayed any ideas ?
Upvotes: 1
Views: 3015
Reputation: 423
You have to use two updatepanels (one for the linkbutton and another for the radiobutton) and associate each updateprogress with the corresponding. If you need to update the entire page use one global updatepanel , by setting the childastrigger option as appropriate.
<asp:UpdatePanel ID="UpdtGlobal" runat="server" ChildrenAsTriggers="true">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text=" <%$Resources:Resource,SelectPlatform %>" />
<asp:UpdatePanel ID="UpdtLinkButton" runat="server" ChildrenAsTriggers="true">
<ContentTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="platformElementHL" CommandArgument='<%# Eval("PLATFORM_ID")%>'
OnClick="platformHyperLink_Click" OnClientClick="ShowSearchButton();" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("PLATFORM_NAME")%>' />
<asp:UpdatePanel ID="UpdtRadButton" runat="server" ChildrenAsTriggers="true">
<ContentTemplate>
<telerik:radbutton id="findDevice" runat="server" text="<%$Resources:Resource,Search %>"
onclientclicked="HideTootltip" onclick="findDevice_Click" style="display: none" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdtLinkButton"
runat="server">
<ProgressTemplate>
<img src="App_Themes/WebPortalTheme/images/HomePage/icon-loading-animated.gif" width="20"
height="20" alt="Progress" />
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdateProgress ID="UpdateProgress2" AssociatedUpdatePanelID="UpdtRadButton"
runat="server">
<ProgressTemplate>
<img src="App_Themes/WebPortalTheme/images/HomePage/icon-loading-animated.gif" width="20"
height="20" alt="Progress" />
</ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
</asp:UpdatePanel>
Upvotes: 2