473,698 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
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
BasePartialCach ingControl.PreR enderRecursiveI nternal(), where only the last
cached style output is used, and any previous style cache is overwritten.

Any comment or suggestions welcome
JX

Dec 8 '07 #1
1 1187
JX
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.Sty leSheet.CSSStyl eString (in
BasePartialCach ingControl.PreR enderRecursiveI nternal), 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

"JX" <no***@noret.co mwrote in message
news:uW******** ******@TK2MSFTN GP05.phx.gbl...
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
BasePartialCach ingControl.PreR enderRecursiveI nternal(), where only the
last
cached style output is used, and any previous style cache is overwritten.

Any comment or suggestions welcome
JX

Dec 10 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5490
by: Dean L. Howen | last post by:
Dear friends, Could we determine when context menu should appear?
2
1447
by: Bernie Yaeger | last post by:
I have an mdi app that has a main menu on the parent form. I would like to use a treeview in place of one of the menu options, so that instead of a menu option - say, 'reports' - it would have 'reports' but the second level would not be menu items for each report but rather a treeview control which, when clicked, would produce the appropriate report. Essentially, then, what I want to do is use a treeview where a sub menu list ordinarily...
1
1714
by: denappel | last post by:
Hi all, We're currently developping an asp.net 2.0 project, and ran into a problem with the new menu control. At the first load of the page, no errors are generated, but after a first postback an error pops up when hovering over a menu item: "Error: '0.cells' is null or not an object"
4
1323
by: A. Haeser | last post by:
Hello, I have build a little application with dynamic usercontrols on a panel. Sometimes there are 5 userscontrols on the panel, sometimes much more. It is database driven, everey usercontrol needs to get details from database. I've tried to cache some panels in a collection using a key. This gives me more performance because about of 25 keys will be used randomely.
2
11684
by: Lucky | last post by:
hi guys, i'm working on the context menu for the controls. the problem i'm facing right now is like this : i want to use one context menu for more then one controls lets say i want to use one context menu for 3 treeview controls as 3 of them shares same type of menu. what i'm not able to do is, i can not idetify which control has invoke the context menu's event. let say one of the treeview control has invoke an event "Reset" from the...
3
2104
by: John | last post by:
Hi there, I was reading an article (http://avenuea-razorfish.com/articles/TheAll-MenuNavigation_Turbek.pdf) on 'all-menu navigation' and I'd like to try and implement this in my site. Can anyone recommend how to get started? Is there an Ajax control available for this or would more a basic javascript work just as well. I'm assuming I just need a div element that is shown on a mouse over, but I'm not sure how to go about aligning all...
1
2263
by: =?Utf-8?B?c2lMdmVy?= | last post by:
Hihi, Currently, had to create a tree view side menu using asp .net 1.0. Had did some research but didn't find a good artical on it. There's what i need to do: Retrieve data from database to form e menu. The menu is dynamic, it will display different data in e database according to e different login users. e.g.
7
2141
by: Nathan Sokalski | last post by:
I have a page which I dynamically add several usercontrols (*.ascx files) to using the following code: Public Sub Refresh() For Each section As DataRow In Me.GetSections().Rows CType(Me.FindControl("admin" & CStr(section("buttontext")).Replace(" ", "")), adminsection2).RefreshSection() Next End Sub
4
3145
by: MikeB | last post by:
Hello All, I am trying to cache a menu that I dynamically build out and I do not want to have to build it out each time the page loads. Here is how I am doing it however, it doesnt work. Can anyone help? TIA if (Cache == null) { THIS IS WHERE I BUILD OUT THE MENU ITEMS
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.