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 3 3582
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
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
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 directive to vary its cache based on
that property value?
I.e., I have:
<my:control runat="server" id="mcOne" Flag="One" />
<my:control runat="server" id="mcTwo" Flag="Two" />
|
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 cached, as if the outputcache is ignored.
There is available RAM on the server.
Other pages are cached as expected.
On the development environment and on a test server, it works fine.
Are there any limitations to the .NET caching, apart from RAM...
|
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. This user control is used on many pages. In order to create this
control, I need to access information in the Active Directory to create both
the menu and other info displayed on the control.
This access takes some time and I wanted to cache this...
|
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! Page has expired" error message, when pushing the Back
Button in my Web browser.
|
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 permission but with the outputcache
the request doesn't pass throught the module after the page is cached...
Thanks,
Fabio
| |
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 correctly shows this as a green comment...but don't be fooled. .NET
still processes and caches the output. In my case, the ClientID values
started being duplicated for a DataList object.
|
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 EventArgs)
lblOutput.Text = "Welcome, " & Request.Params("id") & " The
time now is " & DateTime.Now.ToString("T")
End Sub
</script>
|
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 dropdownlist with auto-postback, the cache for the control
be cleaned and the content regenerated.
Is there a way to do this ?
|
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 problem went away.
I put in the outputcache back and the problem is back.
I am using forms authentication... and asp.net 2.0.
Have you seen this problem before... any help is deeply appreciated.
|
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...
|
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,...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |