WebPart not visible, CslaDataSource still firing SelectObject

WebPart not visible, CslaDataSource still firing SelectObject

Old forum URL: forums.lhotka.net/forums/t/1920.aspx


skagen00 posted on Thursday, December 07, 2006

I'm sure this likely has to do with the .Net WebPart framework and perhaps someone has experienced what I'm encountering and can point me in the right way.

I want to expose many possible WebParts on a "dashboard" page that views into a rather robust business object. Now, each user will certainly only have a subset of the available parts visible.

When a WebPart is not visible, however, I want to save any processing time related to that part. However, it seems that even if my WebPart is configured by a particular user to not show (and hence not be in any of the WebPartZones of the WebPartManager), it still fires the databinding code - for CslaDataSource, it ends of invoking SelectObject.

My actual aspx page has a couple zones, with my few Web parts littered between the two zones. Through personalization I made a few of the WebParts invisible (including the one mentioned above).

Is it the approach I'm taking to WebParts one that might be incorrect, or is it just "how it is" with Web parts? Currently, all of my WebParts populate from the same business object (a retrieved individual or organization) so it's not likely much extra database querying that needs to be done under most circumstances, but if I end up having 20 or 30 possible web parts (some which likely may require extra database access), I feel like there's a lot of overhead there that shouldn't be.

Thanks!

 

Copyright (c) Marimer LLC