Reputation: 319
Can someone explain to me what happens if I call updatePanel.Update() multiple times in the same postback event? Is the client updated each time, or will it only get updated once?
Thanks
Upvotes: 2
Views: 475
Reputation: 61905
Calling UpdatePanel.Update
will only update that UpdatePanel once - remember that the panel/controls go through the full PostBack lifecycle so this just ensures that the UpdatePanels content (and applicable ViewState/ControlState) is sent back to the client for further processing.
This can be verified this by looking at the server response. Each Update Panel with updated content, either manually through Update
or automatically as described here, has an associated |updatePanel|<panel_id>|<new_content>|
section in the response - where each panel can have at most one |updatePanel|
entry.
If an outer Update Panel is updated, then every contained Update Panel (immediate children and distant grandchildren) will also be updated as part of the outer Update Panel instead of having its own |updatePanel|
entry.
Upvotes: 1