Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Caching parsed child elements

Reply
Thread Tools

Caching parsed child elements

 
 
Tom
Guest
Posts: n/a
 
      01-08-2009
Hi,

A slightly complex one, I hope I explain it clearly...

I have a usercontrol which use the ParseChildren(False) and
ControlBuilder attributes.
The usercontrol is called from the parent page using the following
example...
<uc1:Menu>
<MenuItem Title="First Item"/>
<MenuItem Title="Sub Menu Header"><MenuItem Title="Sub Menu Item"/></
MenuItem>
<MenuItem Title="Last Item"/>
</uc1:Menu>

Everything is working fine - the usercontrol is calling the
AddParsedSubObject, the GetChildControlType of the Builder is being
called, the MenuItem objects are created with all their attributes...
all hunky-dory.
(Although I don't quite understand exactly when the system calls
GetChildControlType, as it doesn't always appear to break-point when
I'd expect it to!)

My question is whether it is possible to cache those MenuItem objects,
and use them instead of the AddParsedSubObject being called every
single time the page is loaded.
The menus I have are quite large, and it's a waste of processing to
create the MenuItems objects everytime.

Any help, or suggestions of different approaches, very welcome

Cheers,
Tom
 
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
Disable page caching without disabling caching of jpegs andstylesheets etc JimLad ASP .Net 3 01-21-2010 10:13 AM
XSLT: iterating all child elements and accessing homonymous childrenin sibling elements Gerald Aichholzer XML 2 06-27-2006 03:46 PM
Fragment Caching inside page caching? Troy Simpson ASP .Net 0 01-19-2004 11:57 AM
How do I: Main thread spawn child threads, which child processes...control those child processes? Jeff Rodriguez C Programming 23 12-09-2003 11:06 PM
trouble with caching or caching the trouble Hypo ASP .Net 6 08-01-2003 07:11 AM



Advertisments