This is a migrated thread and some comments may be shown as answers.

[Solved] [VB.NET/Panelbar + Tabcontrol] Question regarding caching

1 Answer 72 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michiel Peeters
Top achievements
Rank 1
Michiel Peeters asked on 11 May 2010, 08:15 AM
Dear Telerik Community,

Lik the title of this thread is telling, i have a question regarding caching. I develop my websites in different browsers so that the website works on every browser. Only one thing occurs to me. Let me explain what i have seen. I make use of the tabcontrol where the content is a panelbar control. For the rest i make use of VS2008 with Framework 3.5.

Inside the tabcontrol my content gets loaded with LoadContentFrom (this renders me a partial view where the panelbar control is located). When i add a new item (so that my panelbar needs to be updated) it does not show up in Internet Explorer. The wierdest thing is that it shows up in Firefox, Chome etc... So my question is how is the caching done? I have discovered that the tabcontrol does not cache but makes the request only once. So when i navigate away from the page and come back my LoadContentFrom will be executed once again, but how is it done with the panelbar?

I hope i have make my point clear, if not ill try to describe it better.

Kind regards,
Michiel Peeters

1 Answer, 1 is accepted

Sort by
0
Michiel Peeters
Top achievements
Rank 1
answered on 12 May 2010, 03:12 PM
The problem is solved by the following code snippit

<script type="text/javascript">  
    function onSelect(e) {  
        var $item = $(e.item);  
        var $link = $item.find('.t-link');  
        var contentUrl = $link.data('ContentUrl') + '?a=' + Math.floor(Math.random() * 11);  
        if (contentUrl) {  
            $.get(contentUrl, function(data) {  
                e.contentElement.html(data);  
            });  
        }  
    }  
</script> 

Yours faithfully,
Michiel Peeters
Tags
General Discussions
Asked by
Michiel Peeters
Top achievements
Rank 1
Answers by
Michiel Peeters
Top achievements
Rank 1
Share this question
or