473,626 Members | 3,093 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to avoid that something be saved in cache

WT
Hello,

I have a dictionary made with objects which contain a control element, the
control element is added to a Page when I want to edit the dictionary
content.
I put this dictionary in cache to improve ovaral speed.
But I am using Ajax.Net and somme of my controls are registering script with
the scrip manager on the PreRender stage of the control and it appears that
the control elements, when saving the dictionary in cache, are also saved
as members of the main dictionary object.
Doing so, depending on their status at the time of caching, they seem to
save an indicator saying that Prerender as aleady been done and when I
reload from cache and try to display again theses controls, they are unable
to register their script because the indicator says that:
Script controls may not be registered after PreRender.

So I am looking for a fast way to avoid thta the control element in each
object e saved in cache ?
Isn't their some declarative syntaxe to set on the element and saying 'Don't
go in cache'

Thanks for help.

CS

Jun 27 '08 #1
1 1220
Hi CS,

From your description, you have some ASP.NET controls that will be added
into page dynamically. Also, you currently cache these control instances in
ASP.NET cache, however, you encounter some problems when any of those
controls try registering some client script on page, correct?

Based on the error message you mentioned, the ASP.NET runtime indicate that
the script registering code has been done after page's "PreRender" stage.
For the control elements, are they your custom controls? If so, would you
show me the script registering code in those controls? Since you add those
controls in page's PreRender event(the last event we can do persistent
changes to ASP.NET page), it is possible that any other changes in your
custom controls is invoked too late.

For dynamic controls, it is recommended to be created in page's Init or
Load event so that the dynamic loaded control can also go through those
page events (such as postback event processing, ....) correctly.

#How to: Add Controls to an ASP.NET Web Page Programmaticall y
http://msdn.microsoft.com/en-us/library/kyt0fzt1.aspx

#HOW TO: Dynamically Create Controls in ASP.NET by Using Visual C# .NET
http://support.microsoft.com/kb/317794

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "WT" <WT@newsgroups. nospam>
Subject: How to avoid that something be saved in cache
Date: Fri, 23 May 2008 11:05:15 +0200
>Hello,

I have a dictionary made with objects which contain a control element, the
control element is added to a Page when I want to edit the dictionary
content.
I put this dictionary in cache to improve ovaral speed.
But I am using Ajax.Net and somme of my controls are registering script
with
>the scrip manager on the PreRender stage of the control and it appears
that
>the control elements, when saving the dictionary in cache, are also saved
as members of the main dictionary object.
Doing so, depending on their status at the time of caching, they seem to
save an indicator saying that Prerender as aleady been done and when I
reload from cache and try to display again theses controls, they are
unable
>to register their script because the indicator says that:
Script controls may not be registered after PreRender.

So I am looking for a fast way to avoid thta the control element in each
object e saved in cache ?
Isn't their some declarative syntaxe to set on the element and saying
'Don't
>go in cache'

Thanks for help.

CS

Jun 27 '08 #2

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

Similar topics

2
1878
by: Marwin | last post by:
Hi all, I have a database with 40GB of binary objects stored in image columns in two tables. Our database server is also used for another 15 databases. SQL Server caches the image-column, causing the cache-hit-ratio to dramatically decrease, since fetching a couple of binaries from the image-column uses up the
0
1548
by: vanisathish | last post by:
Hi All, I am running IIS5.1. I am invoking an ASP page in ther server continously from the HTML Page, to update some contents of the html page. The ASP page seem to run from the cache sometimes(Not Always). I tried to give the following header to my ASP file. Response.Expires = 0 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "no-cache"
17
5911
by: Pushkar Pradhan | last post by:
I want to time my matrix multiply code (in MFLOPS). I want to run the code 100,000 times or some other big number. This can be done 2 ways (for and while loops): timer1 = time(NULL); for(n = 0; n < 100000; n++) mm(); timer2 = time(NULL); exectime = difftime(timer2, timer1);
3
1252
by: Shawn | last post by:
Hi. We have a web application that is used by several different companies. Each company have access to a couple of hundred records which they are updating daily. One of they companies have reported many problems since their IT department set up a proxy server. When they click a button to save data or insert a new record all they get is a "Page cannot be displayed"-page. If they press back in IE and try again, they might or might not...
0
1111
by: Niklas | last post by:
Hi I have made a Hello World application and used On-Touch deplyment thru a shared network path and from out Intranet. Now I have found the HelloWorld assembly in both C:\WINNT\assembly\download and C:\Documents and Settings\\Local Settings\Application Data\assembly. Why is it saved in two places and what is the differance between the two? I have used gacutil.exe to clear the downloaded cache, but when I installed version 1.1 I did not get a...
2
1253
by: teo | last post by:
I have Datagrid on an aspx page. The datagrid has data distribued on several page (that is it has navigation buttons). Question: After the data are displayed on the Datagrid, all the data are saved on the Cache (= Temporary Internet File folder), so the user can see them offline?
3
2596
by: visu | last post by:
I am currently working on my personl website a completely DB driven web application. in that i ve updating the images thru my admin panel .. but i am getting the old images not the update one when see the pages in the front . when i explicitly right click and select refresh button or hit F5 ,then my pages are loaded with new images.. why this kind of effect is happening. how to avoid the caching of images in both the server side(page...
0
1989
by: Michael Nemtsev | last post by:
Hi, I need to stay on the current page even if user clicks "BACK" in browser. Opera is very stubborn in attemp of turning cached page off, and using current. Does anybody know the way how to say Opera not to show previous page when I click "Back" button and show current page. Which meta info should be specified?! Currently I use the following code, which works fine with IE and FireFox (no previously cached page is shown)
1
3241
by: tanyali | last post by:
Hi, I am using asp.net and c# i have an iframe within a page PageA. the source file for the ifram is page PageB. I type in some text and press search from PageA, the result will be displayed in the iframe. The problem is when I search for the same text string a second time, the result come out straightaway without executing the search action, which is because of the cache. I want to avoid the cache in the page. I tried to add code to...
0
8259
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
8192
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
8696
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
8637
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
8502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7188
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6119
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4090
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...
1
1805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.