I have two Webpartzones on my page in given below manner:
<asp:WebPartZone ID="Left" WebPartVerbRenderMode="TitleBar" runat="server" CssClass="PartZone" >
<MinimizeVerb Text="Minimize" Enabled="true" />
<RestoreVerb Text="Restore" Enabled="true" />
<CloseVerb Text="Close" Enabled="true" />
<ZoneTemplate>
<REAMS:TotoalEnergyGenerated runat="server" ID="TotEneryGen" />
<REAMS:NoOfSystemsOnline runat="server" ID="OnlineSys" />
<REAMS:WeatherInfo Title=" " ID="WeatherInfoExec" runat="server" />
<REAMS:AssetMap ID="AssetMapExec" runat="server" />
</ZoneTemplate>
</asp:WebPartZone>
<asp:WebPartZone ID="Bottom" WebPartVerbRenderMode="TitleBar" runat="server" CssClass="PartZone" >
<MinimizeVerb Text="Minimize" Enabled="true" />
<RestoreVerb Text="Restore" Enabled="true" />
<CloseVerb Text="Close" Enabled="true" />
<ZoneTemplate>
<REAMS:ProjectSummary ID="Project" runat="server" />
</ZoneTemplate>
</asp:WebPartZone>
as it is evident, webpartzone left
has four gadgets(controls) in it and webpartzone bottom
has one. So for the first time, for any given user, left shows four and bottom
shows one gadget. Now, suppose user closes one of the 4 gadgets and now left
has just three gadgets. Next time he comes and finds the page layout as per his previous modifications.
I have these gadgets as UserControls. These usercontrols have public methods to hit the database and perform some logic and get data and I call these public methods on the webpart page(and not on the uc itself). i.e. ucGadget1.LoadData();
here's my problem: I want to load only those gadgets(UCs) which are not closed by the user i.e. which are visible when the webpart page loads. Am unable to find difference between a webpart kept on the page but not visible and a webpart kept on the page and visible. Because all the properties of these webparts are the ones that is being written on the designer.I need those which get rendered at the runtime(and through the ASP.NET Personalization Tables)
(please consider gadget = webpart)