Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

cache two usercontrols which contain either menu or treeview will not work?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JX - 08 Dec 2007 08:18 GMT
if you cache two usercontrols, and both of which contains either a menu or
treeview, then the first time you get the response right, but on second
reqeust or any later request where the cached content is used, the outout
will not be correct. inspecting the html source, I found some inline style
definition is missing for later response. It seems this is a bug in asp.net
BasePartialCachingControl.PreRenderRecursiveInternal(), where only the last
cached style output is used, and any previous style cache is overwritten.

Any comment or suggestions welcome
JX
JX - 10 Dec 2007 04:13 GMT
Besides the senerio of two side by side usercontrols being cached, there is
another senerio, suppose one usercontrol uses embedded style(both menu and
treeview use these, and many other ajax controls also use this technique to
inject style definition into the html head element), and it contains a child
usercontrol who is also set to cached, and also uses embedded style, the two
controls expiration event will ussually not coincident, and now suppose that
the parent one is being regenerated while the child one has still a valid
cached version, in this case, since the child one's css settings will go
through the path of page.header.StyleSheet.CSSStyleString (in
BasePartialCachingControl.PreRenderRecursiveInternal), so it will not be
merged with the parent control's css setting, which results an incorrect css
setting string being stored into cache, so any subsequence output of the
parent usercontrol from cache will be incorrect.

Any comment or suggestions welcome.
JX

> if you cache two usercontrols, and both of which contains either a menu or
> treeview, then the first time you get the response right, but on second
[quoted text clipped - 6 lines]
> Any comment or suggestions welcome
> JX

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.