473,326 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 1210
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 Programmatically
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****@microsoft.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
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,...
0
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...
17
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;...
3
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...
0
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...
2
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...
3
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...
0
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...
1
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.