Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Asp Net 1.1, Dynamic loaded User Controls Output Caching

Reply
Thread Tools

Asp Net 1.1, Dynamic loaded User Controls Output Caching

 
 
jason
Guest
Posts: n/a
 
      12-21-2006
hi,

I have a dynamically loaded user control with output caching enabled, it
works fine when a single instance is loaded. However, if I try to
dynamically load two instances of the user control (i.e. different news
content), the last partialcachingcontrol was used for both instances, now
both controls show the last news content.

Here is the code :


============================

protected void LoadUserControl(string ucid)
{
control = LoadControl("NewsContent.ascx");

control.ID = ucid;

Panel1.Controls.Add(control);


NewsContent uc10 = control as NewsContent;

if (uc10 == null)

{

PartialCachingControl pcc = control as PartialCachingControl;

if (pcc != null) uc10 = pcc.CachedControl as NewsContent;

}

if (uc10 != null) uc10.NewsID= int.Parse(ParamArgs[0].ToString());

}


=========================

I am using Asp .net 1.1

Can anyone help? Thanks.



 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET Output caching question: does it cache the contents of System.Net.HttpWebRequest requests Ken Fine ASP .Net 2 09-17-2008 02:31 AM
Issues in ASP.NET 2.0 when dynamically loading user controls or asp.net web controls??? Bob Rock ASP .Net 1 09-17-2006 01:49 PM
Dynamic Controls created by Dynamic Controls Ronald ASP .Net 2 01-17-2006 12:44 AM
Caching of dynamic loaded usercontrols Sven Schimmel ASP .Net Web Controls 1 07-31-2003 04:13 PM
Output Caching for Dynamically Loaded User Controls Teo Lachev ASP .Net 0 07-01-2003 12:16 PM



Advertisments