Yes, all those datasources will be executed hence it's not a good approach. MultiView renders only active view, but all controls in all views are going through the page life cycle therefore will be executed.
Do all sql DataSources load in asp.net Multiview control?
-
26-06-2022 - |
Question
Scenario: We have an asp.net page with a MultiView control on it. In the MV there are 4 views, each with its own sqlDataSource or sets thereof.
So lets say this:
View 1:
- DataSource1
View 2:
- DataSource2
- DataSource3
View 3:
- DataSource4
- DataSource5
- DataSource6
View 4:
- DataSource7
My question:
If the page loads with View 1 as the active view. Do all 7 datasources attempt to execute their queries or only the ones located in "view 1"?
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow