[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.caching

OutputCache on webusercontrol with treeview

phancey

2/3/2009 2:59:00 PM

hi,

I have a webusercontrol that has a dropdownlist and a treeview.
Depending on the value selected in the dropdownlist I want a certain
treeview showing. This works fine if I don't put caching on. If I then
try to add the OutputCache directive with VaryByControl="myDDL" (in
the web user control ascx file) then on the retrieve from the cache
(i.e. when I pick a previously selected value from the dropdownlist),
the treeview is shown in its collapsed state but the togglenode
functions stop working so I can't drill down. The TreeView_ToggleNode
javascript function is now getting the "data" parameter as null (I am
using asp:TreeView).

Anyone know what I'm doing wrong? Is it a simple fix?
thanks
Phil
2 Answers

phancey

2/3/2009 3:03:00 PM

0

On 3 Feb, 14:59, phancey <d...@2bytes.co.uk> wrote:
> hi,
>
> I have a webusercontrol that has a dropdownlist and a treeview.
> Depending on the value selected in the dropdownlist I want a certain
> treeview showing. This works fine if I don't put caching on. If I then
> try to add the OutputCache directive with VaryByControl="myDDL" (in
> the web user control ascx file) then on the retrieve from the cache
> (i.e. when I pick a previously selected value from the dropdownlist),
> the treeview is shown in its collapsed state but the togglenode
> functions stop working so I can't drill down. The TreeView_ToggleNode
> javascript function is now getting the "data" parameter as null (I am
> using asp:TreeView).
>
> Anyone know what I'm doing wrong? Is it a simple fix?
> thanks
> Phil

I should add that it is a control that is then placed within a
TabControl inside an UpdatePanel on an aspx page which itself is
within a Master Page

phancey

2/3/2009 3:25:00 PM

0

On 3 Feb, 15:03, phancey <d...@2bytes.co.uk> wrote:
> On 3 Feb, 14:59, phancey <d...@2bytes.co.uk> wrote:
>
>
>
>
>
> > hi,
>
> > I have a webusercontrol that has a dropdownlist and a treeview.
> > Depending on the value selected in the dropdownlist I want a certain
> > treeview showing. This works fine if I don't put caching on. If I then
> > try to add the OutputCache directive with VaryByControl="myDDL" (in
> > the web user control ascx file) then on the retrieve from the cache
> > (i.e. when I pick a previously selected value from the dropdownlist),
> > the treeview is shown in its collapsed state but the togglenode
> > functions stop working so I can't drill down. The TreeView_ToggleNode
> > javascript function is now getting the "data" parameter as null (I am
> > using asp:TreeView).
>
> > Anyone know what I'm doing wrong? Is it a simple fix?
> > thanks
> > Phil
>
> I should add that it is a control that is then placed within a
> TabControl inside an UpdatePanel on an aspx page which itself is
> within a Master Page- Hide quoted text -
>
> - Show quoted text -

More info: I've dropped it onto a straightforward page and the caching
works. If I put it in a master page it works. If I put it in an Update
Panel it stops working (UpdateMode = conditional).

Is this the way it should work?