Asp – Update Panels in Repeaters – Why can’t multiple callback at the same time

asp.netasp.net-ajaxupdatepanel

I have an update panel in a repeater

(Edit: I removed Runat and Id attributes to make the post look cleaner)

<asp:Repeater>
    <ItemTemplate>
        <asp:UpdatePanel UpdateMode="Conditional">
            <ContentTemplate>
                 <asp:LinkButton onclick="btnCallback_Click" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdateProgress DisplayAfter="0">
            <ProgressTemplate>
                <img src="spinningProgress.gif" />
            </ProgressTemplate>
        </asp:UpdateProgress>
    </ItemTemplate>
</asp:Repeater>

The idea is here that you click the LinkButton and it calls back and performs a server side action for that data item. This works perfectly fine for one item. However, if I click the button for every item without waiting for the previous update panel to finish the call back, it appears to cancel the previous callback.

Can UpdatePanels not perform call backs at the same time? Is there anyway I can make it so you don't need to wait before clicking on the next button?

Best Answer

Every AJAX request performed via UpdatePanel cancels any previous one (if previous is still running). This is how it is built. UpdatePanel AJAX request passes portions of ViewState along with request. It is impossible (at least very hard) to reconcile multiple arbitrary viewstates brought back by concurrent ajax calls. I heard that this was the primary reason MS chose to build it that way.

EDIT: use jQuery and have fun :-)

Related Topic