Is there any difference whether the DataSource was in or out the UpdatePanel
Is there any difference whether the DataSource was in or out the UpdatePanel?
No, there is no difference. especially that DataSource is not a UI element, so it is not affected by partial postback or UpdatePanel1.Update().
And as MSDN states:
UpdatePanel: Enables sections of a page to be partially rendered without a postback.
this should not be an issue, feel free to include it inside/out of an UpdatePanel.
I don't believe so. The update panel only dictates what controls are updated from an asynchronous server post back. As the normal page cycle still takes place, other controls, including DataSource controls, will be loaded as normal regardless of where they are declared.
It is not uncommon to have datasourcs on UserControls that are then placed inside update panels.
精彩评论