ASP.net 1.1 Event Not Firing - Cached User Control -
01-21-2007
, 06:10 PM
I have a user control that contains a grid that fires a selectedindexchanged
event. My problem is that the event does not fire when the user control
is cached. I have read a lot on the web to try to resolve this issue - but
with no success. I am reloading my cached user control in the Page_Load
event as follows (using Delphi.Net):
aUserControl:= nil;
aControl:= LoadControl('PortfolioInvestmentStrategyUserContro l.ascx');
InvestmentStrategiesPlaceHolder.Controls.Add(aCont rol);
if aControl is TPortfolioInvestmentStrategyUserControl then
aUserControl:= aControl as TPortfolioInvestmentStrategyUserControl
else
if (aControl is PartialCachingControl) and (PartialCachingControl(aControl).CachedControl
<> nil) then
aUserControl:= PartialCachingControl(aControl).CachedControl as TPortfolioInvestmentStrategyUserControl;
if aUserControl <> nil then
begin
aUserControl.ID := 'InvestmentStrategy' + I.ToString;
aUserControl.InvestmentStrategy := Strategies[i] as InvestmentStrategy;
end;
Regards,
David Compton
mailto:david.w.compton (AT) gmail (DOT) com |