HighTechTalks DotNet Forums  

ASP.net 1.1 Event Not Firing - Cached User Control

ASP.net Caching microsoft.public.dotnet.framework.aspnet.caching


Discuss ASP.net 1.1 Event Not Firing - Cached User Control in the ASP.net Caching forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
David Compton
 
Posts: n/a

Default 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



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.