473,378 Members | 1,478 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,378 software developers and data experts.

Outputcache problems

Hi,

I have an ASP.NET 2.0 application that allows content search. Search is
included in all pages and a cross postback to the search results page is
performed with the text inserted by the user. The search results also allows
refining the search and a search button that performs a postback triggers the
search. Many of the web pages in the web site have an OutputCache directive
and the search results page does not. When I run the first search, results
are fine. The problem is in subsequent searches, from the search results page
or global search (included in every page). The search is performed with the
old value an not with the value the user inserts. How can we have pages in
OutputCache and have forms posting back the actual values and not cached
values like it seems to be the case?

Thanks in advance,
Miguel Isidoro
Feb 15 '07 #1
3 3572
Howdy,

The question is, how do you pass criteria (text entered by user) to the
result page? if you're using querystring but built on client site (through
javascript), everything should be fine (even on cached pages, because
redirect to common result page happens at the client side). Are there any
chances you're redirecting on POSTBACK, with criteria stored in Session or
querystring? (Please note cache manager stores two versions of the page when
any of the VaryByWhatEver attributes are set to off/none, one for
!ISPostBack and another for IsPostBack == true). If i'm not mistaken, you've
created a global search component as a user control (is it cached too?) to do
the redirect with user entered text. So if the page is cached, whatever you
put as criteria, it will be save in cache for first postback, so any next
requests are going to be issued directly from cache. To solve the problem,
use javascript in conjunction with query string to pass values entered by the
user, or see at the partial caching asp.net 2.0 feature. If it doesn't
resolve the issue, please do not hesitate posting some code, so we could help.

--
Milosz
"Miguel Isidoro" wrote:
Hi,

I have an ASP.NET 2.0 application that allows content search. Search is
included in all pages and a cross postback to the search results page is
performed with the text inserted by the user. The search results also allows
refining the search and a search button that performs a postback triggers the
search. Many of the web pages in the web site have an OutputCache directive
and the search results page does not. When I run the first search, results
are fine. The problem is in subsequent searches, from the search results page
or global search (included in every page). The search is performed with the
old value an not with the value the user inserts. How can we have pages in
OutputCache and have forms posting back the actual values and not cached
values like it seems to be the case?

Thanks in advance,
Miguel Isidoro
Feb 16 '07 #2
Hi,

The global search is in fact in a web user control that is not cached. I
can't use javascript since my web application must be accessible and cannot
depend on javascript client code to work, essentially on such an important
function as search. From what I have searched and you confirmed, the only is
not to use Outputcache. Any other suggestions?

Another thing and a thing that I don't understand is one thing: my results
search page that also allows an advanched search is not in outputcache. When
I try a new search from it and submit the search (a postback to the same web
page - the search results page), the page is not reloaded (page_load and
other page events are not executed). If the page is not in outputcache, how
can this be?

Thanks in advance,
Miguel

"Milosz Skalecki [MCAD]" wrote:
Howdy,

The question is, how do you pass criteria (text entered by user) to the
result page? if you're using querystring but built on client site (through
javascript), everything should be fine (even on cached pages, because
redirect to common result page happens at the client side). Are there any
chances you're redirecting on POSTBACK, with criteria stored in Session or
querystring? (Please note cache manager stores two versions of the page when
any of the VaryByWhatEver attributes are set to off/none, one for
!ISPostBack and another for IsPostBack == true). If i'm not mistaken, you've
created a global search component as a user control (is it cached too?) to do
the redirect with user entered text. So if the page is cached, whatever you
put as criteria, it will be save in cache for first postback, so any next
requests are going to be issued directly from cache. To solve the problem,
use javascript in conjunction with query string to pass values entered by the
user, or see at the partial caching asp.net 2.0 feature. If it doesn't
resolve the issue, please do not hesitate posting some code, so we could help.

--
Milosz
"Miguel Isidoro" wrote:
Hi,

I have an ASP.NET 2.0 application that allows content search. Search is
included in all pages and a cross postback to the search results page is
performed with the text inserted by the user. The search results also allows
refining the search and a search button that performs a postback triggers the
search. Many of the web pages in the web site have an OutputCache directive
and the search results page does not. When I run the first search, results
are fine. The problem is in subsequent searches, from the search results page
or global search (included in every page). The search is performed with the
old value an not with the value the user inserts. How can we have pages in
OutputCache and have forms posting back the actual values and not cached
values like it seems to be the case?

Thanks in advance,
Miguel Isidoro
Feb 16 '07 #3
Hi there again,

Did you switch to 'downlevel' redering with no javascript? If not, please
note javascript is used by default to postback the form. In addition to that,
you won't affect acessibility using javascript to build query string and
redirect from cached pages. Show us some code, so we could come up with an
idea. Remember you may use partial caching ne feature in ASP.NET 2.0.

--
Milosz
"Miguel Isidoro" wrote:
Hi,

The global search is in fact in a web user control that is not cached. I
can't use javascript since my web application must be accessible and cannot
depend on javascript client code to work, essentially on such an important
function as search. From what I have searched and you confirmed, the only is
not to use Outputcache. Any other suggestions?

Another thing and a thing that I don't understand is one thing: my results
search page that also allows an advanched search is not in outputcache. When
I try a new search from it and submit the search (a postback to the same web
page - the search results page), the page is not reloaded (page_load and
other page events are not executed). If the page is not in outputcache, how
can this be?

Thanks in advance,
Miguel

"Milosz Skalecki [MCAD]" wrote:
Howdy,

The question is, how do you pass criteria (text entered by user) to the
result page? if you're using querystring but built on client site (through
javascript), everything should be fine (even on cached pages, because
redirect to common result page happens at the client side). Are there any
chances you're redirecting on POSTBACK, with criteria stored in Session or
querystring? (Please note cache manager stores two versions of the page when
any of the VaryByWhatEver attributes are set to off/none, one for
!ISPostBack and another for IsPostBack == true). If i'm not mistaken, you've
created a global search component as a user control (is it cached too?) to do
the redirect with user entered text. So if the page is cached, whatever you
put as criteria, it will be save in cache for first postback, so any next
requests are going to be issued directly from cache. To solve the problem,
use javascript in conjunction with query string to pass values entered by the
user, or see at the partial caching asp.net 2.0 feature. If it doesn't
resolve the issue, please do not hesitate posting some code, so we could help.

--
Milosz
"Miguel Isidoro" wrote:
Hi,
>
I have an ASP.NET 2.0 application that allows content search. Search is
included in all pages and a cross postback to the search results page is
performed with the text inserted by the user. The search results also allows
refining the search and a search button that performs a postback triggers the
search. Many of the web pages in the web site have an OutputCache directive
and the search results page does not. When I run the first search, results
are fine. The problem is in subsequent searches, from the search results page
or global search (included in every page). The search is performed with the
old value an not with the value the user inserts. How can we have pages in
OutputCache and have forms posting back the actual values and not cached
values like it seems to be the case?
>
Thanks in advance,
Miguel Isidoro
Feb 16 '07 #4

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

Similar topics

6
by: Tom Kiefer | last post by:
Question: If I have an ASP.NET User Control which defines/exposes a property that the page can use to specify a mode or data subset for the control to use, is there a way to tell the @OutputCache...
0
by: Vassilis T. via .NET 247 | last post by:
The following piece of code, when on a heavily loaded server (more than 50 ASP.NET pages, most using outputcache with varybyparam, lots of users), will only cache the string - the output is not...
1
by: Barbara Alderton | last post by:
I have the following scenario: I have a user control that contains a registered menu control. The menu and other information on the user control is specific to the user accessing the site. ...
1
by: Johan Nedin | last post by:
Hello! I am having a problem with the @OutputCache page directive and Web browser Back Buttons. Problem: After setting <%@ OutputCache Location="None" %> on my pages I get the "Warning!...
0
by: Fabio R. | last post by:
Hi, is there a way to have an HttpModule working also if the page has the OutputCache directive (<%@ OutputCache Duration="60" VaryByParam="none"%>)? I use an HttpModule to check some access...
1
by: Amil Hanish | last post by:
I had an aspx page with output caching turned on. Then I wanted to do some other stuff and I commented it out like: <!-- <%@ OutputCache Duration="1800" VaryByParam="t" %> --> The IDE...
5
by: Arpan | last post by:
I am using the following code to cache the page output for 60 seconds: <%@ OutputCache Duration="60" VaryByParam="*" %> <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As...
3
by: craigkenisston | last post by:
Hi, I have some controls with these: <%@ OutputCache Duration="500" Shared="true" VaryByParam="None" %> However, I need that under certain user action, specifically, changing a value on a...
2
by: Nalaka | last post by:
Hi, I get the following error, I thought at random intervals. Then I realized, that this happens around the time tha page outputCache is set to expire. So I disabled the page output cache and the...
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: 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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.