HighTechTalks DotNet Forums  

Partial Output Caching Not working with drop down list

ASP.net Caching microsoft.public.dotnet.framework.aspnet.caching


Discuss Partial Output Caching Not working with drop down list in the ASP.net Caching forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Tim Barcz
 
Posts: n/a

Default Partial Output Caching Not working with drop down list - 07-18-2006 , 10:20 AM






I have a page which shows (for simplicity sake) one user control. This
user control has the following declaration

<%@ OutputCache Duration="20" VaryByControl="ddlDays"%>

Where ddlDays is a DropDownList containing a range of days. ddlDays is
populated in code by adding ListBoxItems to the Items property. There
is a datagrid on the page which should show different lists depending
on the date selected in ddlDays.

Everything works fine until I do a ctrl + f5 (in IE) AFTER a postback.
When doing this action, I get prompted by the standard "page cannot be
refreshed without resending the information". I click retry, which
display the page fine. It is the ensuing dropdownlist change that
doesn't produce expected results. When I select something, all
postback data is lost. For example, when I debug and look at ddl days
all of a sudden has 0 items and the selectedIndexChanged event never
fires (Page_Load occurs but not SelectedIndexChanged, though that is
the event that cause the postback).

Very irritating behavior. Have been looking at this for two weeks now.

I have the GetPostBackReference(this) in the page load event of the
containing page. This is not a JavaScript problem, rather a ASP.NET
problem since everything is posting back and what not. It just seems
like viewstate is lost when I do a ctrl + refresh.

The very very frustrating part is that everything works fine if I turn
off output caching (remove the declarative tag).


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.